Commit d380d0c7 authored by brendan's avatar brendan
Browse files

framelength off-by-one error for some bitrates (from Pritpaul Mahal)

svn path=/trunk/libshout/; revision=5031
parent 74ed0d5b
/* -*- c-basic-offset: 8; -*- */
\/* -*- c-basic-offset: 8; -*- */
/* mp3.c: libshout MP3 format handler */
#include <stdio.h>
......@@ -265,7 +265,7 @@ static void parse_header(mp3_header_t *mh, uint32_t header)
mh->samples = 576;
if(mh->samplerate)
mh->framesize = ((float)mh->samples * mh->bitrate * 1000 / (float)mh->samplerate) / 8 + mh->padding;
mh->framesize = (mh->samples * mh->bitrate * 1000 / mh->samplerate) / 8 + mh->padding;
}
/* mp3 frame parsing stuff */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment