[FFmpeg-cvslog] lavc: override decode return value only in case of error

Clément Bœsch git at videolan.org
Sun May 1 14:54:24 CEST 2016


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun May  1 14:53:53 2016 +0200| [bbf02f7d288681d2ba6d522a99e6341dc3984247] | committer: Clément Bœsch

lavc: override decode return value only in case of error

Fixes Ticket #5350

Regression since 29412821241050c846dbceaad4b9752857659977.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbf02f7d288681d2ba6d522a99e6341dc3984247
---

 libavcodec/utils.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ffbabb1..e6609ef 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
 



More information about the ffmpeg-cvslog mailing list