aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pictordec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-03 14:00:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-03 14:12:53 +0200
commitefb21b0a8fbc61d01ba1f22677abfbca99e6167d (patch)
tree355052e76cbc7aa69e4fa98146e1c93ce38a22a5 /libavcodec/pictordec.c
parent164b67ca281fa5a47b965a858c7783aa547091b8 (diff)
parent5f7aecde02a95451e514c809f2794c1deba80695 (diff)
downloadffmpeg-efb21b0a8fbc61d01ba1f22677abfbca99e6167d.tar.gz
Merge commit '5f7aecde02a95451e514c809f2794c1deba80695'
* commit '5f7aecde02a95451e514c809f2794c1deba80695': pictordec: break out of both decoding loops when y drops below 0 Conflicts: libavcodec/pictordec.c The added check is redundant. It shows the error path more clearly though See: f3f488423a12af9bb4eed6e6868cfa86ece3571b Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pictordec.c')
-rw-r--r--libavcodec/pictordec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index bf138b2a44..df3380ddda 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -226,6 +226,8 @@ static int decode_frame(AVCodecContext *avctx,
if (bits_per_plane == 8) {
picmemset_8bpp(s, frame, val, run, &x, &y);
+ if (y < 0)
+ goto finish;
} else {
picmemset(s, frame, val, run, &x, &y, &plane, bits_per_plane);
}
@@ -246,6 +248,7 @@ static int decode_frame(AVCodecContext *avctx,
y--;
}
}
+finish:
*got_frame = 1;
return avpkt->size;