OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
724b1f6
)
Parse fact chunks from wav files to find duration.
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 15 Jan 2011 17:13:32 +0000
(17:13 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 15 Jan 2011 17:13:32 +0000
(17:13 +0000)
Originally committed as revision 26370 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/wav.c
patch
|
blob
|
history
diff --git
a/libavformat/wav.c
b/libavformat/wav.c
index
7cb2429
..
894c0c0
100644
(file)
--- a/
libavformat/wav.c
+++ b/
libavformat/wav.c
@@
-232,7
+232,18
@@
static int wav_read_header(AVFormatContext *s,
av_set_pts_info(st, 64, 1, st->codec->sample_rate);
- size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
+ for (;;) {
+ if (url_feof(pb))
+ return -1;
+ size = next_tag(pb, &tag);
+ if (tag == MKTAG('d', 'a', 't', 'a')){
+ break;
+ }else if (tag == MKTAG('f','a','c','t') && !sample_count){
+ sample_count = get_le32(pb);
+ size -= 4;
+ }
+ url_fseek(pb, size, SEEK_CUR);
+ }
if (rf64)
size = data_size;
if (size < 0)