Mercurial > libavcodec.hg
changeset 12282:f31ba4ca1397 libavcodec
Show correct bitrate for VBR MP3 files.
Patch by Alexander Kojevnikov, alexander kojevnikov com
author | cehoyos |
---|---|
date | Tue, 27 Jul 2010 10:08:34 +0000 |
parents | bf51ca1aafb8 |
children | a08f20066719 |
files | mpegaudiodec.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegaudiodec.c Tue Jul 27 07:18:36 2010 +0000 +++ b/mpegaudiodec.c Tue Jul 27 10:08:34 2010 +0000 @@ -2054,7 +2054,8 @@ } /* update codec info */ avctx->channels = s->nb_channels; - avctx->bit_rate = s->bit_rate; + if (!avctx->bit_rate) + avctx->bit_rate = s->bit_rate; avctx->sub_id = s->layer; if(*data_size < 1152*avctx->channels*sizeof(OUT_INT)) @@ -2122,7 +2123,8 @@ /* update codec info */ avctx->sample_rate = s->sample_rate; avctx->channels = s->nb_channels; - avctx->bit_rate = s->bit_rate; + if (!avctx->bit_rate) + avctx->bit_rate = s->bit_rate; avctx->sub_id = s->layer; s->frame_size = len;