diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-22 13:54:41 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-22 13:58:48 +0300 |
commit | ba71f2680e99dd6409e8d7fa71f6ffc07902a9ae (patch) | |
tree | 8eb14f6b8526ff64dd635d7573e4bf3cd17eb303 /demuxer/Demuxers/LAVFAudioHelper.cpp | |
parent | 3362dfface1b81ecea676d782695ada4c54762a8 (diff) |
Update ffmpeg
Diffstat (limited to 'demuxer/Demuxers/LAVFAudioHelper.cpp')
-rw-r--r-- | demuxer/Demuxers/LAVFAudioHelper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/demuxer/Demuxers/LAVFAudioHelper.cpp b/demuxer/Demuxers/LAVFAudioHelper.cpp index e32df27b..5a797a6c 100644 --- a/demuxer/Demuxers/LAVFAudioHelper.cpp +++ b/demuxer/Demuxers/LAVFAudioHelper.cpp @@ -125,7 +125,7 @@ WAVEFORMATEX *CLAVFAudioHelper::CreateWVFMTEX(const AVStream *avstream, ULONG *s wvfmt->nChannels = avstream->codec->channels ? avstream->codec->channels : 2; wvfmt->nSamplesPerSec = avstream->codec->sample_rate ? avstream->codec->sample_rate : 48000; - wvfmt->nAvgBytesPerSec = avstream->codec->bit_rate / 8; + wvfmt->nAvgBytesPerSec = (DWORD)(avstream->codec->bit_rate / 8); if(avstream->codec->codec_id == AV_CODEC_ID_AAC || avstream->codec->codec_id == AV_CODEC_ID_AAC_LATM) { wvfmt->wBitsPerSample = 0; @@ -284,7 +284,7 @@ MPEG1WAVEFORMAT *CLAVFAudioHelper::CreateMP1WVFMT(const AVStream *avstream, ULON memset(mpwvfmt, 0, sizeof(MPEG1WAVEFORMAT)); memcpy(&mpwvfmt->wfx, wvfmt, sizeof(WAVEFORMATEX)); - mpwvfmt->dwHeadBitrate = avstream->codec->bit_rate; + mpwvfmt->dwHeadBitrate = (DWORD)avstream->codec->bit_rate; mpwvfmt->fwHeadMode = avstream->codec->channels == 1 ? ACM_MPEG_SINGLECHANNEL : ACM_MPEG_DUALCHANNEL; mpwvfmt->fwHeadLayer = (avstream->codec->codec_id == AV_CODEC_ID_MP1) ? ACM_MPEG_LAYER1 : ACM_MPEG_LAYER2; @@ -292,9 +292,9 @@ MPEG1WAVEFORMAT *CLAVFAudioHelper::CreateMP1WVFMT(const AVStream *avstream, ULON avstream->codec->sample_rate = 48000; } mpwvfmt->wfx.wFormatTag = WAVE_FORMAT_MPEG; - mpwvfmt->wfx.nBlockAlign = (avstream->codec->codec_id == AV_CODEC_ID_MP1) + mpwvfmt->wfx.nBlockAlign = WORD((avstream->codec->codec_id == AV_CODEC_ID_MP1) ? (12 * avstream->codec->bit_rate / avstream->codec->sample_rate) * 4 - : 144 * avstream->codec->bit_rate / avstream->codec->sample_rate; + : 144 * avstream->codec->bit_rate / avstream->codec->sample_rate); mpwvfmt->wfx.cbSize = sizeof(MPEG1WAVEFORMAT) - sizeof(WAVEFORMATEX); @@ -312,7 +312,7 @@ VORBISFORMAT *CLAVFAudioHelper::CreateVorbis(const AVStream *avstream, ULONG *si vfmt->nChannels = avstream->codec->channels; vfmt->nSamplesPerSec = avstream->codec->sample_rate; - vfmt->nAvgBitsPerSec = avstream->codec->bit_rate; + vfmt->nAvgBitsPerSec = (DWORD)avstream->codec->bit_rate; vfmt->nMinBitsPerSec = vfmt->nMaxBitsPerSec = (DWORD)-1; *size = sizeof(VORBISFORMAT); |