aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-11-29 18:02:19 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-11-29 18:02:19 +0000
commitb37aa4de2deb79aeb2b8c52a1696d796cde7ce72 (patch)
tree3634d445c240bb2c6e612adab2eaccf3e44ef9ab
parent8aeb33225aed5a0da03f9145a09ca1bbd6ac6532 (diff)
downloadffmpeg-b37aa4de2deb79aeb2b8c52a1696d796cde7ce72.tar.gz
Use the correct chroma values for the data[] array used in
draw_slice(). The chroma values to use are supposed to be those of the input format, not that of the output format, the latter case was causing crashes and chroma issues. Originally committed as revision 20660 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavfilter/vf_scale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 95d2ef1fec..108811a9bb 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -115,8 +115,6 @@ static int config_props(AVFilterLink *outlink)
av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s\n",
outlink->w, outlink->h, avcodec_get_pix_fmt_name(outlink->format));
- avcodec_get_chroma_sub_sample(outlink->format, &scale->hsub, &scale->vsub);
-
scale->input_is_pal = inlink->format == PIX_FMT_PAL8 ||
inlink->format == PIX_FMT_BGR4_BYTE ||
inlink->format == PIX_FMT_RGB4_BYTE ||
@@ -132,6 +130,8 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
AVFilterLink *outlink = link->dst->outputs[0];
AVFilterPicRef *outpicref;
+ avcodec_get_chroma_sub_sample(link->format, &scale->hsub, &scale->vsub);
+
outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
outpicref->pts = picref->pts;
outlink->outpic = outpicref;