aboutsummaryrefslogtreecommitdiff
path: root/gst-libs/ext/libav/libavcodec/pictordec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/ext/libav/libavcodec/pictordec.c')
-rw-r--r--gst-libs/ext/libav/libavcodec/pictordec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst-libs/ext/libav/libavcodec/pictordec.c b/gst-libs/ext/libav/libavcodec/pictordec.c
index 16f9307..53fef1c 100644
--- a/gst-libs/ext/libav/libavcodec/pictordec.c
+++ b/gst-libs/ext/libav/libavcodec/pictordec.c
@@ -122,7 +122,7 @@ static int decode_frame(AVCodecContext *avctx,
s->nb_planes = (tmp >> 4) + 1;
bpp = bits_per_plane * s->nb_planes;
if (bits_per_plane > 8 || bpp < 1 || bpp > 32) {
- av_log_ask_for_sample(s, "unsupported bit depth\n");
+ av_log_ask_for_sample(avctx, "unsupported bit depth\n");
return AVERROR_PATCHWELCOME;
}
@@ -227,16 +227,17 @@ 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);
}
}
}
} else {
- av_log_ask_for_sample(s, "uncompressed image\n");
+ av_log_ask_for_sample(avctx, "uncompressed image\n");
return avpkt->size;
}
+finish:
*got_frame = 1;
*(AVFrame*)data = s->frame;