@@ -338,6 +338,8 @@ int avfilter_config_links(AVFilterContext *filter)
link->w = inlink->w;
if (!link->h)
link->h = inlink->h;
+ if (!link->color_range)
+ link->color_range = inlink->color_range;
} else if (!link->w || !link->h) {
av_log(link->src, AV_LOG_ERROR,
"Video source filters must set their output link's "
@@ -600,6 +600,8 @@ struct AVFilterLink {
*/
AVBufferRef *hw_frames_ctx;
+ enum AVColorRange color_range; ///< color range type, video only
+
#ifndef FF_INTERNAL_FIELDS
/**
@@ -90,8 +90,8 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
frame = ff_frame_pool_get(link->frame_pool);
if (!frame)
return NULL;
-
frame->sample_aspect_ratio = link->sample_aspect_ratio;
+ frame->color_range = link->color_range;
return frame;
}
Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavfilter/avfilter.c | 2 ++ libavfilter/avfilter.h | 2 ++ libavfilter/video.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)