diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c index 16f930730b..f88fc52f1b 100644 --- a/libavcodec/pictordec.c +++ b/libavcodec/pictordec.c @@ -227,7 +227,7 @@ static int decode_frame(AVCodecContext *avctx, if (bits_per_plane == 8) { picmemset_8bpp(s, val, run, &x, &y); if (y < 0) - break; + goto finish; } else { picmemset(s, val, run, &x, &y, &plane, bits_per_plane); } @@ -237,6 +237,7 @@ static int decode_frame(AVCodecContext *avctx, av_log_ask_for_sample(s, "uncompressed image\n"); return avpkt->size; } +finish: *got_frame = 1; *(AVFrame*)data = s->frame;