Mercurial > libavformat.hg
changeset 5740:421297d526d0 libavformat
matroskadec: timestamps are dts and not pts in ms vfw compatibility mode
original patch by elupus _at_ ecce _dot_ se
author | aurel |
---|---|
date | Wed, 03 Mar 2010 21:46:43 +0000 |
parents | 84bfac703b3a |
children | 8221d200d033 |
files | matroskadec.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Wed Mar 03 21:00:50 2010 +0000 +++ b/matroskadec.c Wed Mar 03 21:46:43 2010 +0000 @@ -143,6 +143,7 @@ AVStream *stream; int64_t end_timecode; + int ms_compat; } MatroskaTrack; typedef struct { @@ -1244,6 +1245,7 @@ if (!strcmp(track->codec_id, "V_MS/VFW/FOURCC") && track->codec_priv.size >= 40 && track->codec_priv.data != NULL) { + track->ms_compat = 1; track->video.fourcc = AV_RL32(track->codec_priv.data + 16); codec_id = ff_codec_get_id(ff_codec_bmp_tags, track->video.fourcc); extradata_offset = 40; @@ -1698,6 +1700,9 @@ pkt->flags = is_keyframe; pkt->stream_index = st->index; + if (track->ms_compat) + pkt->dts = timecode; + else pkt->pts = timecode; pkt->pos = pos; if (st->codec->codec_id == CODEC_ID_TEXT)