aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_scale.c
diff options
context:
space:
mode:
authorThomas Mundt <loudmax@yahoo.de>2015-12-31 00:01:21 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-15 17:23:54 +0100
commit482ca8241d7758ff81c51e1f54fa4bb1286269e4 (patch)
treed348a9c99b99f1256d4e5531db58b4430b5646a8 /libavfilter/vf_scale.c
parentf3cf94fa47d197ed33c00012a0a827bf88431e6d (diff)
downloadffmpeg-482ca8241d7758ff81c51e1f54fa4bb1286269e4.tar.gz
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: Thomas Mundt <loudmax@yahoo.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 73ce8162f3499cf0e86d1d80dea53324bd62bcb3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r--libavfilter/vf_scale.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index f77884c27a..ab6cab0a07 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -523,6 +523,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,