ffplay: remove redundant !codec check
authorMarton Balint <cus@passwd.hu>
Sun, 28 Oct 2012 00:22:47 +0000 (02:22 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 1 Nov 2012 14:46:18 +0000 (15:46 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index beced86..e3b156a 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2307,8 +2307,7 @@ static int stream_component_open(VideoState *is, int stream_index)
     opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec);
     if (!av_dict_get(opts, "threads", NULL, 0))
         av_dict_set(&opts, "threads", "auto", 0);
-    if (!codec ||
-        avcodec_open2(avctx, codec, &opts) < 0)
+    if (avcodec_open2(avctx, codec, &opts) < 0)
         return -1;
     if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
         av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);