matroskadec: set duration only for CODEC_ID_TEXT subtitles

Originally committed as revision 15453 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-09-28 22:58:53 +00:00
parent e7d4b7431d
commit 1bb4a1a1c4
1 changed files with 2 additions and 2 deletions

View File

@ -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)