OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddd429f
)
avformat/mp3dec: offset seek index to end of vbr headers
author
wm4
<nfxjfg@googlemail.com>
Tue, 14 Apr 2015 19:24:36 +0000
(21:24 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 15 Apr 2015 11:25:08 +0000
(13:25 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mp3dec.c
patch
|
blob
|
history
diff --git
a/libavformat/mp3dec.c
b/libavformat/mp3dec.c
index
fa0868d
..
1692d88
100644
(file)
--- a/
libavformat/mp3dec.c
+++ b/
libavformat/mp3dec.c
@@
-334,6
+334,7
@@
static int mp3_read_header(AVFormatContext *s)
AVStream *st;
int64_t off;
int ret;
+ int i;
st = avformat_new_stream(s, NULL);
if (!st)
@@
-363,6
+364,10
@@
static int mp3_read_header(AVFormatContext *s)
if (ret < 0)
return ret;
+ // the seek index is relative to the end of the xing vbr headers
+ for (i = 0; i < st->nb_index_entries; i++)
+ st->index_entries[i].pos += avio_tell(s->pb);
+
/* the parameters will be extracted from the compressed bitstream */
return 0;
}