[FFmpeg-cvslog] ffplay: fix forgotten codec_name checks

Michael Niedermayer git at videolan.org
Wed Sep 28 03:20:57 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 28 03:05:33 2011 +0200| [0aa793a1be5925f26405bd0617a249cd3f61e6a5] | committer: Michael Niedermayer

ffplay: fix forgotten codec_name checks

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0aa793a1be5925f26405bd0617a249cd3f61e6a5
---

 ffplay.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 12b79aa..46eff5c 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;



More information about the ffmpeg-cvslog mailing list