aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnshul Maheshwari <er.anshul.maheshwari@gmail.com>2015-02-06 20:12:13 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-02-07 05:51:17 +0100
commit5647286e677839dd736c00d8f80514376c4cc9e3 (patch)
tree7194f611ece7fd9a52d5cd9b556d9659c92943fa
parentbf30161a8db1c30583db0e57bbe978417a9eb301 (diff)
downloadffmpeg-5647286e677839dd736c00d8f80514376c4cc9e3.tar.gz
avcodec/ccaption_dec: handle error from ass_sub api
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ccaption_dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index d772cfc9bb..5e514b277f 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -181,13 +181,16 @@ static av_cold int init_decoder(AVCodecContext *avctx)
ctx->mode = CCMODE_ROLLUP_2;
ctx->rollup = 2;
ret = ff_ass_subtitle_header_default(avctx);
+ if(ret < 0) {
+ goto fail;
+ }
/* allocate pkt buffer */
ctx->pktbuf = av_buffer_alloc(128);
if( !ctx->pktbuf) {
ret = AVERROR(ENOMEM);
}
-
+fail:
return ret;
}