Fix for XING parsing
This commit is contained in:
parent
31eac8cb06
commit
e7c4b92b76
1 changed files with 9 additions and 7 deletions
|
@ -173,14 +173,18 @@ fail:
|
|||
{
|
||||
frame.header = header;
|
||||
if (mad_frame_decode(&frame, &stream) == -1)
|
||||
break;
|
||||
continue;
|
||||
|
||||
if (xing_parse (&xing, stream.anc_ptr, stream.anc_bitlen) == 0)
|
||||
{
|
||||
has_xing = YES;
|
||||
vbr = YES;
|
||||
|
||||
frames = xing.frames;
|
||||
mad_timer_multiply (&_duration, frames);
|
||||
|
||||
bitrate = 8.0 * xing.bytes / mad_timer_count(_duration, MAD_UNITS_SECONDS);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -247,9 +251,8 @@ fail:
|
|||
bitsPerSample = 16;
|
||||
isBigEndian=YES;
|
||||
isUnsigned=NO;
|
||||
[self scanFileFast:YES useXing:YES];
|
||||
channels = 2;
|
||||
return YES;
|
||||
|
||||
return [self scanFileFast:YES useXing:YES];
|
||||
}
|
||||
|
||||
- (BOOL)readInfo:(const char *)filename
|
||||
|
@ -498,7 +501,6 @@ static inline signed int scale (mad_fixed_t sample)
|
|||
|
||||
- (double)seekToTime:(double)milliseconds
|
||||
{
|
||||
NSLog(@"Seeking");
|
||||
int new_position;
|
||||
int seconds = milliseconds/1000.0;
|
||||
int total_seconds = mad_timer_count(_duration, MAD_UNITS_SECONDS);
|
||||
|
|
Loading…
Reference in a new issue