X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fomadec.c;h=757ae5371a93715da1611f46af50b4f594abc297;hb=ecd360041ea7f206e42736f046a3ecb9984e0763;hp=6e476dbf25b080d85d8f3f2ca63c76fe168fc153;hpb=b6422902d84ec8df6f5a64ffd8743e93307bd8e9;p=ffmpeg diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 6e476dbf25b..757ae5371a9 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -365,7 +365,7 @@ static int oma_read_header(AVFormatContext *s) st->codecpar->channels = 2; st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; st->codecpar->sample_rate = samplerate; - st->codecpar->bit_rate = st->codecpar->sample_rate * framesize * 8 / 1024; + st->codecpar->bit_rate = st->codecpar->sample_rate * framesize / (1024 / 8); /* fake the ATRAC3 extradata * (wav format, makes stream copy to wav work) */ @@ -398,7 +398,7 @@ static int oma_read_header(AVFormatContext *s) return AVERROR_INVALIDDATA; } st->codecpar->sample_rate = samplerate; - st->codecpar->bit_rate = samplerate * framesize * 8 / 2048; + st->codecpar->bit_rate = samplerate * framesize / (2048 / 8); avpriv_set_pts_info(st, 64, 1, samplerate); break; case OMA_CODECID_MP3: