Commit 73ce8162 authored by Thomas Mundt's avatar Thomas Mundt Committed by Michael Niedermayer

avfilter/vf_scale: set proper out frame color range

Prevents that following scalers in the filter chain will do unintentional color range conversions.
Fixes Ticket #5096
Signed-off-by: 's avatarThomas Mundt <loudmax@yahoo.de>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8de5b0d9
......@@ -567,6 +567,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
sws_setColorspaceDetails(scale->isws[1], inv_table, in_full,
table, out_full,
brightness, contrast, saturation);
av_frame_set_color_range(out, out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG);
}
av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment