diff options
author | Clément Bœsch <u@pkh.me> | 2016-05-01 14:53:53 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-05-01 14:53:53 +0200 |
commit | bbf02f7d288681d2ba6d522a99e6341dc3984247 (patch) | |
tree | fb451aff24a096d1f0f06e6c95d89c97afe3ab06 | |
parent | 532e9370835d8afb7d20a86b652585b44ada627b (diff) | |
download | ffmpeg-bbf02f7d288681d2ba6d522a99e6341dc3984247.tar.gz |
lavc: override decode return value only in case of error
Fixes Ticket #5350
Regression since 29412821241050c846dbceaad4b9752857659977.
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ffbabb1061..e6609ef9b2 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2633,7 +2633,9 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, && *got_sub_ptr && sub->num_rects) { const AVRational tb = avctx->pkt_timebase.num ? avctx->pkt_timebase : avctx->time_base; - ret = convert_sub_to_old_ass_form(sub, avpkt, tb); + int err = convert_sub_to_old_ass_form(sub, avpkt, tb); + if (err < 0) + ret = err; } #endif |