diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-04-14 21:24:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-15 13:25:08 +0200 |
commit | 3163083f7b8fd836aad5222dbd01357f3434118b (patch) | |
tree | 7fe8491a72414cba9b65e595e81811234c6ae41e /libavformat/mp3dec.c | |
parent | ddd429fab635e65681f829b84651867782f2ed89 (diff) | |
download | ffmpeg-3163083f7b8fd836aad5222dbd01357f3434118b.tar.gz |
avformat/mp3dec: offset seek index to end of vbr headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index fa0868dea0..1692d8848d 100644 --- 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; } |