mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
bf30161a8d
commit
5647286e67
|
@ -181,13 +181,16 @@ static av_cold int init_decoder(AVCodecContext *avctx)
|
||||||
ctx->mode = CCMODE_ROLLUP_2;
|
ctx->mode = CCMODE_ROLLUP_2;
|
||||||
ctx->rollup = 2;
|
ctx->rollup = 2;
|
||||||
ret = ff_ass_subtitle_header_default(avctx);
|
ret = ff_ass_subtitle_header_default(avctx);
|
||||||
|
if(ret < 0) {
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
/* allocate pkt buffer */
|
/* allocate pkt buffer */
|
||||||
ctx->pktbuf = av_buffer_alloc(128);
|
ctx->pktbuf = av_buffer_alloc(128);
|
||||||
if( !ctx->pktbuf) {
|
if( !ctx->pktbuf) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue