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

lavc/utils: use pkt_timebase for legacy subtitles timing code

This is consistent with other AVSubtitle timing adjustments.
parent d8620158
......@@ -2585,8 +2585,11 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
#if FF_API_ASS_TIMING
if (avctx->sub_text_format == FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS
&& *got_sub_ptr && sub->num_rects)
ret = convert_sub_to_old_ass_form(sub, avpkt, avctx->time_base);
&& *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);
}
#endif
if (sub->num_rects && !sub->end_display_time && avpkt->duration &&
......
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