Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-10-28 04:19:18 +0400
committerMarton Balint <cus@passwd.hu>2012-11-01 18:46:18 +0400
commitfdb933444add87e026b64639d0db83b0d5177c7b (patch)
tree79599c9660d1e1ffaebbc2d5b5d36b8f159a241b /ffplay.c
parent8cb740245daf8a71904787b572d60715654db0b1 (diff)
ffplay: only initialize codec opts before using it
Fixes Coverity CID 733793. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 23391922ce..beced86493 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2277,7 +2277,6 @@ static int stream_component_open(VideoState *is, int stream_index)
avctx = ic->streams[stream_index]->codec;
codec = avcodec_find_decoder(avctx->codec_id);
- opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec);
switch(avctx->codec_type){
case AVMEDIA_TYPE_AUDIO : is->last_audio_stream = stream_index; if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
@@ -2305,6 +2304,7 @@ static int stream_component_open(VideoState *is, int stream_index)
if(codec->capabilities & CODEC_CAP_DR1)
avctx->flags |= CODEC_FLAG_EMU_EDGE;
+ 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 ||