diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-19 23:30:39 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-19 23:36:23 +0400 |
commit | 194d0399a29cedd9726e4a4b791ca959a7e71e45 (patch) | |
tree | 20705788c66abf1af9bc3c9d9a641e0bd2921db1 /libavformat | |
parent | 833bc6678f7f300e4adc7182894ba3388bb2964c (diff) | |
parent | 505642f18276aed03278ac91b1f334ea888eac6a (diff) |
Merge commit '505642f18276aed03278ac91b1f334ea888eac6a'
* commit '505642f18276aed03278ac91b1f334ea888eac6a':
mp3dec: fallback to generic seeking when a TOC is not present
Conflicts:
libavformat/mp3dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mp3dec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 57e4ba33b1..d599c9c489 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -40,7 +40,7 @@ typedef struct { int xing_toc; int start_pad; int end_pad; -} MP3Context; +} MP3DecContext; /* mp3 read */ @@ -89,7 +89,7 @@ static int mp3_read_probe(AVProbeData *p) static void read_xing_toc(AVFormatContext *s, int64_t filesize, int64_t duration) { int i; - MP3Context *mp3 = s->priv_data; + MP3DecContext *mp3 = s->priv_data; if (!filesize && !(filesize = avio_size(s->pb))) { @@ -113,7 +113,7 @@ static void read_xing_toc(AVFormatContext *s, int64_t filesize, int64_t duration */ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) { - MP3Context *mp3 = s->priv_data; + MP3DecContext *mp3 = s->priv_data; uint32_t v, spf; unsigned frames = 0; /* Total number of frames in file */ unsigned size = 0; /* Total number of bytes in the stream */ @@ -190,7 +190,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) static int mp3_read_header(AVFormatContext *s) { - MP3Context *mp3 = s->priv_data; + MP3DecContext *mp3 = s->priv_data; AVStream *st; int64_t off; @@ -226,7 +226,7 @@ static int mp3_read_header(AVFormatContext *s) static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt) { - MP3Context *mp3 = s->priv_data; + MP3DecContext *mp3 = s->priv_data; int ret, size; int64_t pos; @@ -273,7 +273,7 @@ static int check(AVFormatContext *s, int64_t pos) static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { - MP3Context *mp3 = s->priv_data; + MP3DecContext *mp3 = s->priv_data; AVIndexEntry *ie; AVStream *st = s->streams[0]; int64_t ret = av_index_search_timestamp(st, timestamp, flags); @@ -319,11 +319,11 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, AVInputFormat ff_mp3_demuxer = { .name = "mp3", .long_name = NULL_IF_CONFIG_SMALL("MP2/3 (MPEG audio layer 2/3)"), - .priv_data_size = sizeof(MP3Context), .read_probe = mp3_read_probe, .read_header = mp3_read_header, .read_packet = mp3_read_packet, .read_seek = mp3_seek, + .priv_data_size = sizeof(MP3DecContext), .flags = AVFMT_GENERIC_INDEX, .extensions = "mp2,mp3,m2a", /* XXX: use probe */ }; |