Browse Source

detect avcodec_open() on an already opened AVCodecContext

Originally committed as revision 2251 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 22 years ago
parent
commit
09770af869
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/utils.c

+ 3
- 0
libavcodec/utils.c View File

@@ -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;


Loading…
Cancel
Save