summaryrefslogtreecommitdiff
path: root/libavformat/mp3.c
diff options
context:
space:
mode:
authorAlexander Kojevnikov <alexander@kojevnikov.com>2010-07-27 10:11:05 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-07-27 10:11:05 +0000
commit2a758efe313320f6ff5fc8d9916b263dfc010059 (patch)
treeb9ccdb3284a32c1a8646f26e9325390c47ca896e /libavformat/mp3.c
parent49d7ef282d9a78e4a6813ddabb78f99dac7f55a5 (diff)
Make frames unsigned.
Patch by Alexander Kojevnikov, alexander kojevnikov com Originally committed as revision 24540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mp3.c')
-rw-r--r--libavformat/mp3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index a90654eff2..c1622a3567 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -83,7 +83,7 @@ static int mp3_read_probe(AVProbeData *p)
static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
{
uint32_t v, spf;
- int frames = -1; /* Total number of frames in file */
+ unsigned frames = 0; /* Total number of frames in file */
unsigned size = 0; /* Total number of bytes in the stream */
const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
MPADecodeHeader c;
@@ -122,14 +122,14 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
}
}
- if(frames < 0 && !size)
+ if(!frames && !size)
return -1;
/* Skip the vbr tag frame */
url_fseek(s->pb, base + vbrtag_size, SEEK_SET);
spf = c.lsf ? 576 : 1152; /* Samples per frame, layer 3 */
- if(frames >= 0)
+ if(frames)
st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
st->time_base);
if(size)