diff options
author | Clément Bœsch <u@pkh.me> | 2017-11-29 22:23:36 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-11-29 22:23:36 +0100 |
commit | 8d51d10eb895bda02ab0f8b3af082b5c9a781690 (patch) | |
tree | c3dcb974417b3d0434195c11875a6c334a55d870 /libavcodec/samidec.c | |
parent | 61bbc537ab2305392bd170a6f404ed6402bee4a8 (diff) | |
download | ffmpeg-8d51d10eb895bda02ab0f8b3af082b5c9a781690.tar.gz |
lavc/samidec: properly raise errors from sami_paragraph_to_ass()
Diffstat (limited to 'libavcodec/samidec.c')
-rw-r--r-- | libavcodec/samidec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/samidec.c b/libavcodec/samidec.c index 6a598060ef..e32f238c62 100644 --- a/libavcodec/samidec.c +++ b/libavcodec/samidec.c @@ -138,9 +138,12 @@ static int sami_decode_frame(AVCodecContext *avctx, const char *ptr = avpkt->data; SAMIContext *sami = avctx->priv_data; - if (ptr && avpkt->size > 0 && !sami_paragraph_to_ass(avctx, ptr)) { + if (ptr && avpkt->size > 0) { + int ret = sami_paragraph_to_ass(avctx, ptr); + if (ret < 0) + return ret; // TODO: pass escaped sami->encoded_source.str as source - int ret = ff_ass_add_rect(sub, sami->full.str, sami->readorder++, 0, NULL, NULL); + ret = ff_ass_add_rect(sub, sami->full.str, sami->readorder++, 0, NULL, NULL); if (ret < 0) return ret; } |