Commit 0aa793a1 authored by Michael Niedermayer's avatar Michael Niedermayer

ffplay: fix forgotten codec_name checks

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2f3dd904
......@@ -2171,9 +2171,9 @@ static int stream_component_open(VideoState *is, int stream_index)
codec = avcodec_find_decoder(avctx->codec_id);
switch(avctx->codec_type){
case AVMEDIA_TYPE_AUDIO : codec= avcodec_find_decoder_by_name( audio_codec_name); break;
case AVMEDIA_TYPE_SUBTITLE: codec= avcodec_find_decoder_by_name(subtitle_codec_name); break;
case AVMEDIA_TYPE_VIDEO : codec= avcodec_find_decoder_by_name( video_codec_name); break;
case AVMEDIA_TYPE_AUDIO : if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
case AVMEDIA_TYPE_SUBTITLE: if(subtitle_codec_name) codec= avcodec_find_decoder_by_name(subtitle_codec_name); break;
case AVMEDIA_TYPE_VIDEO : if(video_codec_name ) codec= avcodec_find_decoder_by_name( video_codec_name); break;
}
if (!codec)
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment