== FFMPEG ==
authorPeter Schlaile <peter@schlaile.de>
Mon, 5 May 2008 22:08:50 +0000 (22:08 +0000)
committerPeter Schlaile <peter@schlaile.de>
Mon, 5 May 2008 22:08:50 +0000 (22:08 +0000)
Fixes: [#10703] loading an .avi captured by dosbox causes a segfault
We shouldn't try to close a codec, if we haven't managed to open one... :)

source/blender/imbuf/intern/util.c

index 4f2a1da5580c758e154f09999ebde9ecb11e21b1..632a471ecd01dc41e627212bb2e3d074e5e79ecb 100644 (file)
@@ -305,13 +305,11 @@ static int isffmpeg (char *filename) {
         /* Find the decoder for the video stream */
        pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
        if(pCodec==NULL) {
-               avcodec_close(pCodecCtx);
                av_close_input_file(pFormatCtx);
                return 0;
        }
 
        if(avcodec_open(pCodecCtx, pCodec)<0) {
-               avcodec_close(pCodecCtx);
                av_close_input_file(pFormatCtx);
                return 0;
        }