mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
lavc/samidec: properly raise errors from sami_paragraph_to_ass()
This commit is contained in:
parent
61bbc537ab
commit
8d51d10eb8
@ -138,9 +138,12 @@ static int sami_decode_frame(AVCodecContext *avctx,
|
|||||||
const char *ptr = avpkt->data;
|
const char *ptr = avpkt->data;
|
||||||
SAMIContext *sami = avctx->priv_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
|
// 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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user