summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-09-28 22:58:53 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-09-28 22:58:53 +0000
commit1bb4a1a1c41aca40055f3c6ae21aea5edc83b44f (patch)
treeeb6e4791ecce50135b5bb68efc2e53c51bbdeab3 /libavformat/matroskadec.c
parente7d4b7431d441ef75abce5582a62394c2b0c830d (diff)
matroskadec: set duration only for CODEC_ID_TEXT subtitles
Originally committed as revision 15453 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 22f70ae87a..56e3c9bf9b 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1621,9 +1621,9 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
pkt->pts = timecode;
pkt->pos = pos;
- if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE)
+ if (st->codec->codec_id == CODEC_ID_TEXT)
pkt->convergence_duration = duration;
- else
+ else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
pkt->duration = duration;
if (st->codec->codec_id == CODEC_ID_SSA)