diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-01-05 15:02:08 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-01-07 10:08:38 +0000 |
commit | 3174137d411df054d81110d5fe08a2565fe0f9cc (patch) | |
tree | 4d9ef6dbe9f87e262e39d8d1acb12173b0c47327 /libavformat/wavdec.c | |
parent | e13c5abbd70440a02e00d7392738a36356481a78 (diff) | |
download | ffmpeg-3174137d411df054d81110d5fe08a2565fe0f9cc.tar.gz |
w64: fact guid support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/wavdec.c')
-rw-r--r-- | libavformat/wavdec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 451187739f..782fa6416d 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -610,6 +610,12 @@ static int w64_read_header(AVFormatContext *s) avio_skip(pb, FFALIGN(size, INT64_C(8)) - size); avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + } else if (!memcmp(guid, ff_w64_guid_fact, 16)) { + int64_t samples; + + samples = avio_rl64(pb); + if (samples > 0) + st->duration = samples; } else if (!memcmp(guid, ff_w64_guid_data, 16)) { wav->data_end = avio_tell(pb) + size - 24; |