Mercurial > mplayer.hg
changeset 36770:ee000da6fa82
ad_ffmpeg: avoid deprecated request_channels.
author | reimar |
---|---|
date | Sun, 16 Feb 2014 16:30:05 +0000 |
parents | 636c79b71de9 |
children | a706bf2ed700 |
files | libmpcodecs/ad_ffmpeg.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Sun Feb 16 16:30:03 2014 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Sun Feb 16 16:30:05 2014 +0000 @@ -127,7 +127,10 @@ lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample; } lavc_context->channel_layout = sh_audio->channel_layout; - lavc_context->request_channels = audio_output_channels; + if (audio_output_channels == 1) + lavc_context->request_channel_layout = AV_CH_LAYOUT_MONO; + else if (audio_output_channels == 2) + lavc_context->request_channel_layout = AV_CH_LAYOUT_STEREO; lavc_context->codec_tag = sh_audio->format; //FOURCC lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi