aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2012-05-30 21:08:01 -0700
committerMichael Niedermayer <michaelni@gmx.at>2012-06-06 18:49:10 +0200
commit92c065f93f74a2f8e2bc5ea313d3f19c7fef693b (patch)
tree6ee20308e1938ea89ac5fbc99ae46689a45d5eea /ffmpeg.c
parent33775c3507f4e0977d8ef1d8c5cbd167d0429319 (diff)
downloadffmpeg-92c065f93f74a2f8e2bc5ea313d3f19c7fef693b.tar.gz
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: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 3d6853fb62..d140eefde3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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 */