33 #define XING_FLAG_FRAMES 0x01
34 #define XING_FLAG_SIZE 0x02
35 #define XING_FLAG_TOC 0x04
37 #define XING_TOC_COUNT 100
54 int max_frames, first_frames = 0;
62 while(buf0 < end && !*buf0)
68 for(; buf <
end; buf= buf2+1) {
71 for(frames = 0; buf2 <
end; frames++) {
78 max_frames =
FFMAX(max_frames, frames);
89 else if(max_frames>=1)
return 1;
98 int fill_index = mp3->
usetoc && duration > 0;
127 static const int64_t
xing_offtbl[2][2] = {{32, 17}, {17,9}};
137 vbrtag_size = c.frame_size;
141 spf = c.lsf ? 576 : 1152;
144 avio_skip(s->
pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
146 is_cbr = v ==
MKBETAG(
'I',
'n',
'f',
'o');
147 if (v ==
MKBETAG(
'X',
'i',
'n',
'g') || is_cbr) {
160 if(v ==
MKBETAG(
'L',
'A',
'M',
'E') || v ==
MKBETAG(
'L',
'a',
'v',
'f')) {
164 mp3-> end_pad = v&4095;
173 if(v ==
MKBETAG(
'V',
'B',
'R',
'I')) {
192 if (size && frames && !is_cbr)
235 #define MP3_PACKET_SIZE 1024
280 return sd.frame_size;
296 if (filesize <= s->data_offset)
301 timestamp = av_clip64(timestamp, 0, duration);
320 for(i=0; i<4096; i++) {
321 int64_t pos = ie->
pos + i*dir;
364 .extensions =
"mp2,mp3,m2a,mpa",
365 .priv_class = &demuxer_class,