diff matroskadec.c @ 3952:9808dea139a1 libavformat

matroskadec: set duration only for CODEC_ID_TEXT subtitles
author aurel
date Sun, 28 Sep 2008 22:58:53 +0000
parents 9315ab7b1c0d
children f1a9ff04eb4b
line wrap: on
line diff
--- a/matroskadec.c	Sun Sep 28 22:55:28 2008 +0000
+++ b/matroskadec.c	Sun Sep 28 22:58:53 2008 +0000
@@ -1621,9 +1621,9 @@
 
                 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)