Fix bitrate reporting for FFmpeg.

This commit is contained in:
Christopher Snowhill 2016-08-10 18:30:48 -07:00
parent add0dba4eb
commit 8337395ba9

View File

@ -277,7 +277,7 @@ ffmpeg_codec_data * init_ffmpeg_faux_riff(STREAMFILE *streamFile, int64_t fmt_of
tb.num = 1; tb.den = data->codecCtx->sample_rate; tb.num = 1; tb.den = data->codecCtx->sample_rate;
data->totalFrames = av_rescale_q(data->formatCtx->streams[streamIndex]->duration, data->formatCtx->streams[streamIndex]->time_base, tb); data->totalFrames = av_rescale_q(data->formatCtx->streams[streamIndex]->duration, data->formatCtx->streams[streamIndex]->time_base, tb);
data->bitrate = (int)((data->codecCtx->bit_rate) / 1000); data->bitrate = (int)(data->codecCtx->bit_rate);
data->framesRead = 0; data->framesRead = 0;
data->endOfStream = 0; data->endOfStream = 0;
data->endOfAudio = 0; data->endOfAudio = 0;