Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}