Update VGMStream.

CQTexperiment
Chris Moeller 2016-07-22 15:03:01 -07:00
parent e94cb95bf5
commit 42a43316b8
2 changed files with 2 additions and 2 deletions

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;
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->endOfStream = 0;
data->endOfAudio = 0;

View File

@ -3540,7 +3540,7 @@ static STREAMFILE * get_vgmstream_streamfile(VGMSTREAM * vgmstream, int channel)
static int get_vgmstream_channel_average_bitrate(STREAMFILE * streamfile, int sample_rate, int length_samples)
{
return (int)((int64_t)get_streamfile_size(streamfile) * 8 * sample_rate / length_samples);
return length_samples ? (int)((int64_t)get_streamfile_size(streamfile) * 8 * sample_rate / length_samples) : 0;
}
int get_vgmstream_average_bitrate(VGMSTREAM * vgmstream)