Commit bbf02f7d authored by Clément Bœsch's avatar Clément Bœsch

lavc: override decode return value only in case of error

Fixes Ticket #5350

Regression since 29412821.
parent 532e9370
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment