diff options
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f441ca2..050f26e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -305,6 +305,9 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec) { int ret; + if(avctx->codec) + return -1; + avctx->codec = codec; avctx->codec_id = codec->id; avctx->frame_number = 0; |