Mercurial > libavformat.hg
changeset 3951:9315ab7b1c0d libavformat
matroskadec: pass duration as parameter of matroska_fix_ass_packet()
author | aurel |
---|---|
date | Sun, 28 Sep 2008 22:55:28 +0000 |
parents | 45684dea4c9b |
children | 9808dea139a1 |
files | matroskadec.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Sat Sep 27 23:12:24 2008 +0000 +++ b/matroskadec.c Sun Sep 28 22:55:28 2008 +0000 @@ -934,7 +934,7 @@ } static void matroska_fix_ass_packet(MatroskaDemuxContext *matroska, - AVPacket *pkt) + AVPacket *pkt, uint64_t display_duration) { char *line, *layer, *ptr = pkt->data, *end = ptr+pkt->size; for (; *ptr!=',' && ptr<end-1; ptr++); @@ -942,7 +942,7 @@ layer = ++ptr; for (; *ptr!=',' && ptr<end-1; ptr++); if (*ptr == ',') { - int64_t end_pts = pkt->pts + pkt->convergence_duration; + int64_t end_pts = pkt->pts + display_duration; int sc = matroska->time_scale * pkt->pts / 10000000; int ec = matroska->time_scale * end_pts / 10000000; int sh, sm, ss, eh, em, es, len; @@ -1627,7 +1627,7 @@ pkt->duration = duration; if (st->codec->codec_id == CODEC_ID_SSA) - matroska_fix_ass_packet(matroska, pkt); + matroska_fix_ass_packet(matroska, pkt, duration); dynarray_add(&matroska->packets, &matroska->num_packets, pkt); }