summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-05-30 08:45:13 -0700
committerBradley Sepos <[email protected]>2019-08-05 06:05:06 -0400
commit4ba75f97f31b0e6f64ebd4684d5f2aeeba494629 (patch)
tree6bc020b38e36e534f7e117d570c6ee6d9fbf72be /libhb/encavcodecaudio.c
parent97324a041a8aad85c05f649f3739df07d4ea29b8 (diff)
audio_resample: set input and output samplerate
Fixes https://github.com/HandBrake/HandBrake/issues/2124
Diffstat (limited to 'libhb/encavcodecaudio.c')
-rw-r--r--libhb/encavcodecaudio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index 4f0e468ff..a3b5b2363 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -249,13 +249,13 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
context->channel_layout, 0);
av_opt_set_int(pv->swresample, "out_channel_layout",
context->channel_layout, 0);
+ av_opt_set_int(pv->swresample, "in_sample_rate",
+ context->sample_rate, 0);
+ av_opt_set_int(pv->swresample, "out_sample_rate",
+ context->sample_rate, 0);
if (hb_audio_dither_is_supported(audio->config.out.codec))
{
// dithering needs the sample rate
- av_opt_set_int(pv->swresample, "in_sample_rate",
- context->sample_rate, 0);
- av_opt_set_int(pv->swresample, "out_sample_rate",
- context->sample_rate, 0);
av_opt_set_int(pv->swresample, "dither_method",
audio->config.out.dither_method, 0);
}