mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-12-05 01:56:41 +00:00
Revert "avformat/mp3dec: offset seek index to end of id3v2 tag"
This reverts commit 8b76c0eb56
.
It was slightly incorrect; the next commit fixes it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a742a0536d
commit
ddd429fab6
@ -106,7 +106,7 @@ static int mp3_read_probe(AVProbeData *p)
|
|||||||
//mpegps_mp3_unrecognized_format.mpg has max_frames=3
|
//mpegps_mp3_unrecognized_format.mpg has max_frames=3
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_xing_toc(AVFormatContext *s, int64_t base, int64_t filesize, int64_t duration)
|
static void read_xing_toc(AVFormatContext *s, int64_t filesize, int64_t duration)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
MP3DecContext *mp3 = s->priv_data;
|
MP3DecContext *mp3 = s->priv_data;
|
||||||
@ -122,7 +122,7 @@ static void read_xing_toc(AVFormatContext *s, int64_t base, int64_t filesize, in
|
|||||||
uint8_t b = avio_r8(s->pb);
|
uint8_t b = avio_r8(s->pb);
|
||||||
if (fill_index)
|
if (fill_index)
|
||||||
av_add_index_entry(s->streams[0],
|
av_add_index_entry(s->streams[0],
|
||||||
av_rescale(b, filesize, 256) + base,
|
av_rescale(b, filesize, 256),
|
||||||
av_rescale(i, duration, XING_TOC_COUNT),
|
av_rescale(i, duration, XING_TOC_COUNT),
|
||||||
0, 0, AVINDEX_KEYFRAME);
|
0, 0, AVINDEX_KEYFRAME);
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ static void read_xing_toc(AVFormatContext *s, int64_t base, int64_t filesize, in
|
|||||||
mp3->xing_toc = 1;
|
mp3->xing_toc = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, int64_t base,
|
static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
|
||||||
MPADecodeHeader *c, uint32_t spf)
|
MPADecodeHeader *c, uint32_t spf)
|
||||||
{
|
{
|
||||||
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
|
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
|
||||||
@ -172,7 +172,7 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, int64_t base,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (v & XING_FLAG_TOC)
|
if (v & XING_FLAG_TOC)
|
||||||
read_xing_toc(s, base, mp3->header_filesize, av_rescale_q(mp3->frames,
|
read_xing_toc(s, mp3->header_filesize, av_rescale_q(mp3->frames,
|
||||||
(AVRational){spf, c->sample_rate},
|
(AVRational){spf, c->sample_rate},
|
||||||
st->time_base));
|
st->time_base));
|
||||||
/* VBR quality */
|
/* VBR quality */
|
||||||
@ -310,7 +310,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
|||||||
mp3->frames = 0;
|
mp3->frames = 0;
|
||||||
mp3->header_filesize = 0;
|
mp3->header_filesize = 0;
|
||||||
|
|
||||||
mp3_parse_info_tag(s, st, base, &c, spf);
|
mp3_parse_info_tag(s, st, &c, spf);
|
||||||
mp3_parse_vbri_tag(s, st, base);
|
mp3_parse_vbri_tag(s, st, base);
|
||||||
|
|
||||||
if (!mp3->frames && !mp3->header_filesize)
|
if (!mp3->frames && !mp3->header_filesize)
|
||||||
|
Loading…
Reference in New Issue
Block a user