diff options
author | jstebbins <[email protected]> | 2014-08-30 23:18:40 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-08-30 23:18:40 +0000 |
commit | aeb4e0f41deaf2a8a8909e5ef95f68e000d92203 (patch) | |
tree | fc88e816dd14e30b9cd627040356bbba8dad2195 | |
parent | 59be70f507a3951cbb0707a706454d6f74fcb85a (diff) |
libhb: don't set duration of PGS subtitles
PGS subtitles are terminated by an explicit "end of sub" subtitle in
the stream. The duration is not used (or known in advance). So every
PGS was getting the default 10s duration assigned. This made the
overall duration of the stream appear longer than it really is.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6384 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/muxavformat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index 72e23f496..284e92718 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -1044,8 +1044,10 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu { // There is a possiblility that some subtitles get through the pipeline // without ever discovering their true duration. Make the duration - // 10 seconds in this case. - if (track->type == MUX_TYPE_SUBTITLE) + // 10 seconds in this case. Unless they are PGS subs which should + // have zero duration. + if (track->type == MUX_TYPE_SUBTITLE && + track->st->codec->codec_id != AV_CODEC_ID_HDMV_PGS_SUBTITLE) duration = av_rescale_q(10, (AVRational){1,1}, track->st->time_base); else |