You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
detect avcodec_open() on an already opened AVCodecContext
Originally committed as revision 2251 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user