Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-10-20 21:33:31 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-10-20 21:35:31 +0400
commit0319b9bbb9e79526fb70f9d5998a05b0ca4b2300 (patch)
tree068e02873a331385451aa59f589bf47485a9289e /demuxer
parent3208854dba2d916d1c985bb45fbef938800fa439 (diff)
Replace a few deprecated function calls
Diffstat (limited to 'demuxer')
-rw-r--r--demuxer/Demuxers/LAVFAudioHelper.cpp4
-rw-r--r--demuxer/Demuxers/LAVFUtils.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/demuxer/Demuxers/LAVFAudioHelper.cpp b/demuxer/Demuxers/LAVFAudioHelper.cpp
index a33238bc..132ca480 100644
--- a/demuxer/Demuxers/LAVFAudioHelper.cpp
+++ b/demuxer/Demuxers/LAVFAudioHelper.cpp
@@ -134,7 +134,7 @@ WAVEFORMATEX *CLAVFAudioHelper::CreateWVFMTEX(const AVStream *avstream, ULONG *s
if ( wvfmt->wBitsPerSample == 0 ) {
DbgOutString(L"BitsPerSample is 0, no good!");
}
- wvfmt->nBlockAlign = (WORD)((wvfmt->nChannels * av_get_bits_per_sample_fmt(avstream->codec->sample_fmt)) / 8);
+ wvfmt->nBlockAlign = (WORD)(wvfmt->nChannels * av_get_bytes_per_sample(avstream->codec->sample_fmt));
}
}
if (!wvfmt->nAvgBytesPerSec)
@@ -233,7 +233,7 @@ WAVEFORMATEXTENSIBLE *CLAVFAudioHelper::CreateWFMTEX_RAW_PCM(const AVStream *avs
if (avstream->codec->sample_fmt == AV_SAMPLE_FMT_S32 && avstream->codec->bits_per_raw_sample > 0) {
wfe->wBitsPerSample = avstream->codec->bits_per_raw_sample > 24 ? 32 : (avstream->codec->bits_per_raw_sample > 16 ? 24 : 16);
} else {
- wfe->wBitsPerSample = av_get_bits_per_sample_fmt(avstream->codec->sample_fmt);
+ wfe->wBitsPerSample = av_get_bytes_per_sample(avstream->codec->sample_fmt) << 3;
}
wfe->nBlockAlign = wfe->nChannels * wfe->wBitsPerSample / 8;
wfe->nAvgBytesPerSec = wfe->nSamplesPerSec * wfe->nBlockAlign;
diff --git a/demuxer/Demuxers/LAVFUtils.h b/demuxer/Demuxers/LAVFUtils.h
index 20b6eecb..b7ec9643 100644
--- a/demuxer/Demuxers/LAVFUtils.h
+++ b/demuxer/Demuxers/LAVFUtils.h
@@ -42,7 +42,7 @@ inline int get_bits_per_sample(AVCodecContext *ctx, bool bRaw = false)
if (ctx->sample_fmt == AV_SAMPLE_FMT_S32 && ctx->bits_per_raw_sample) {
bits = ctx->bits_per_raw_sample;
} else {
- bits = av_get_bits_per_sample_fmt(ctx->sample_fmt);
+ bits = av_get_bytes_per_sample(ctx->sample_fmt) << 3;
}
}
}