[FFmpeg-cvslog] ffplay: remove redundant !codec check

Marton Balint git at videolan.org
Thu Nov 1 22:15:40 CET 2012


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Oct 28 02:22:47 2012 +0200| [fec39d99d63686cb70f47f33473f9607efe3c968] | committer: Marton Balint

ffplay: remove redundant !codec check

Signed-off-by: Marton Balint <cus at passwd.hu>

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

 ffplay.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index beced86..e3b156a 100644
--- 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);



More information about the ffmpeg-cvslog mailing list