mirror of https://git.ffmpeg.org/ffmpeg.git
ffplay: remove now unnecessary request_channels, we set it now with options
This commit is contained in:
parent
92dac3a9dd
commit
1e7f7dc2d1
9
ffplay.c
9
ffplay.c
|
@ -2160,15 +2160,6 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||||
|
|
||||||
opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index]);
|
opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index]);
|
||||||
|
|
||||||
/* prepare audio output */
|
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
|
||||||
if (avctx->channels > 0) {
|
|
||||||
avctx->request_channels = FFMIN(2, avctx->channels);
|
|
||||||
} else {
|
|
||||||
avctx->request_channels = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
codec = avcodec_find_decoder(avctx->codec_id);
|
codec = avcodec_find_decoder(avctx->codec_id);
|
||||||
switch(avctx->codec_type){
|
switch(avctx->codec_type){
|
||||||
case AVMEDIA_TYPE_AUDIO : if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
|
case AVMEDIA_TYPE_AUDIO : if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
|
||||||
|
|
Loading…
Reference in New Issue