Commit 92c065f9 authored by Philip Langdale's avatar Philip Langdale Committed by Michael Niedermayer

ffmpeg: Set duration on encoded subtitle packets.

Currently, we don't set the duration on the packet of a newly
encoded subtitle. This information may be required by the
muxer.
Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 33775c35
......@@ -1650,6 +1650,7 @@ static void do_subtitle_out(AVFormatContext *s,
pkt.data = subtitle_out;
pkt.size = subtitle_out_size;
pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base);
pkt.duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->st->time_base);
if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) {
/* XXX: the pts correction is handled here. Maybe handling
it in the codec would be better */
......
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