==FFMPEG==
authorPeter Schlaile <peter@schlaile.de>
Sun, 21 May 2006 12:20:45 +0000 (12:20 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 21 May 2006 12:20:45 +0000 (12:20 +0000)
Bugfixes: If we got problems on open, don't close a codec context, that
was never created. (read: don't dump core ;-)

source/blender/blenkernel/intern/writeffmpeg.c
source/blender/imbuf/intern/anim.c
source/blender/src/hddaudio.c

index bbeb0e061560d261cbf3c4ec6493679ad3b130cf..b84aa1972f4f0b954991e9c43617270cd9bebc8e 100644 (file)
@@ -537,7 +537,7 @@ void start_ffmpeg_impl(RenderData *rd, int rectx, int recty)
 
        of->preload = (int)(0.5*AV_TIME_BASE);
        of->max_delay = (int)(0.7*AV_TIME_BASE);
-       
+
        snprintf(of->filename, sizeof(of->filename), "%s", name);
        /* set the codec to the user's selection */
        switch(ffmpeg_type) {
index d595154ce99f71b753c3681b9f7f0d6ff7b24ba2..ed0d291fef4b49e47b0b5651a1783ee099de7f34 100644 (file)
@@ -558,7 +558,6 @@ static int startffmpeg(struct anim * anim) {
         /* 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 -1;
        }
@@ -575,7 +574,6 @@ static int startffmpeg(struct anim * anim) {
        pCodecCtx->error_concealment= 3;
 
        if(avcodec_open(pCodecCtx, pCodec)<0) {
-               avcodec_close(pCodecCtx);
                av_close_input_file(pFormatCtx);
                return -1;
        }
index c7dd33ab977dd2d6033f9647664a761795204585..76297b299835ba43244bac4633600fd392e41066 100644 (file)
@@ -140,13 +140,11 @@ struct hdaudio * sound_open_hdaudio(char * filename)
         /* Find the decoder for the audio 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;
        }