matroskadec: set duration only for CODEC_ID_TEXT subtitles

Originally committed as revision 15453 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Aurelien Jacobs 16 years ago
parent e7d4b7431d
commit 1bb4a1a1c4
  1. 4
      libavformat/matroskadec.c

@ -1621,9 +1621,9 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
pkt->pts = timecode; pkt->pts = timecode;
pkt->pos = pos; pkt->pos = pos;
if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) if (st->codec->codec_id == CODEC_ID_TEXT)
pkt->convergence_duration = duration; pkt->convergence_duration = duration;
else else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
pkt->duration = duration; pkt->duration = duration;
if (st->codec->codec_id == CODEC_ID_SSA) if (st->codec->codec_id == CODEC_ID_SSA)

Loading…
Cancel
Save