summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mundt <[email protected]>2015-12-31 00:01:21 +0100
committerMichael Niedermayer <[email protected]>2015-12-31 02:08:20 +0100
commit73ce8162f3499cf0e86d1d80dea53324bd62bcb3 (patch)
tree73d75934d21ab4e64430fa6db5f1084f89df6688
parent8de5b0d96664abfb45212a5f0962ac9b1d452a55 (diff)
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
-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 ce410e910e..7eabe00a23 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -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,