[FFmpeg-cvslog] avcodec/ccaption_dec: handle error from ass_sub api

Anshul Maheshwari git at videolan.org
Sat Feb 7 06:00:46 CET 2015


ffmpeg | branch: master | Anshul Maheshwari <er.anshul.maheshwari at gmail.com> | Fri Feb  6 20:30:13 2015 +0530| [5647286e677839dd736c00d8f80514376c4cc9e3] | committer: Michael Niedermayer

avcodec/ccaption_dec: handle error from ass_sub api

Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5647286e677839dd736c00d8f80514376c4cc9e3
---

 libavcodec/ccaption_dec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index d772cfc..5e514b2 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;
 }
 



More information about the ffmpeg-cvslog mailing list