diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-12-25 15:36:12 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-12-25 15:36:12 +0000 |
commit | 9c87b8f77721bd51c87e735bac1580a99f0b8f2b (patch) | |
tree | 4304f4fdacf346dec5b1467bb5164f51a26d35ce /libavcodec | |
parent | a5baedea012935078e65cc1f8f8914c0ea3ba05b (diff) | |
download | ffmpeg-9c87b8f77721bd51c87e735bac1580a99f0b8f2b.tar.gz |
Check for avcodec_open codec parameter == NULL and return error in that case
Originally committed as revision 11316 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 3b5ef7a773..7277f9222d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -848,7 +848,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) goto end; } - if(avctx->codec) + if(avctx->codec || !codec) goto end; if (codec->priv_data_size > 0) { |