Commit 27c0dd55 authored by Jan Ekström's avatar Jan Ekström

avfilter/vf_zscale: fix mapping of zimg_chroma_location_e to AVChromaLocation

The AVChromaLocation values are one higher than zimg's, not one
lower as the undefined value is set to zero (as opposed to zimg's
-1).
parent cd1d09e8
......@@ -569,7 +569,7 @@ static void update_output_color_information(ZScaleContext *s, AVFrame *frame)
frame->color_trc = (int)s->dst_format.transfer_characteristics;
if (s->chromal != -1)
frame->chroma_location = (int)s->dst_format.chroma_location - 1;
frame->chroma_location = (int)s->dst_format.chroma_location + 1;
}
static int filter_frame(AVFilterLink *link, AVFrame *in)
......
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