]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_hflip.c
Merge commit '488a0fa68973d48e264d54f1722f7afb18afbea7'
[ffmpeg] / libavfilter / vf_hflip.c
index 7fc135fdfc249f20dc76cc88a81e9cd1062c6946..0a9bc2cc6600547ccf14c17f7f9f24ce529c5bc9 100644 (file)
@@ -90,7 +90,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL)
         memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
 
-    for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+    for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
         const int width  = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(inlink->w, s->hsub) : inlink->w;
         const int height = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(inlink->h, s->vsub) : inlink->h;
         step = s->max_step[plane];