From 0aa793a1be5925f26405bd0617a249cd3f61e6a5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 28 Sep 2011 03:05:33 +0200 Subject: [PATCH] ffplay: fix forgotten codec_name checks Signed-off-by: Michael Niedermayer --- ffplay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffplay.c b/ffplay.c index 12b79aa7c6..46eff5c9b6 100644 --- a/ffplay.c +++ b/ffplay.c @@ -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;