Revision: 15939
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15939
Author:   schlaile
Date:     2008-08-03 18:11:57 +0200 (Sun, 03 Aug 2008)

Log Message:
-----------
== FFMPEG ==

This fixes:
[#16655] Blender crashes when Fraps videos are added to the sequencer

(sorry, color conversion is not supported by swscaler for some reason,
so currently, only the crash is fixed)

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/anim.c

Modified: trunk/blender/source/blender/imbuf/intern/anim.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/anim.c    2008-08-03 16:02:56 UTC 
(rev 15938)
+++ trunk/blender/source/blender/imbuf/intern/anim.c    2008-08-03 16:11:57 UTC 
(rev 15939)
@@ -612,6 +612,7 @@
                av_free(anim->pFrameRGB);
                av_free(anim->pFrameDeinterlaced);
                av_free(anim->pFrame);
+               anim->pCodecCtx = NULL;
                return -1;
        }
 
@@ -639,7 +640,19 @@
                PIX_FMT_BGR32,
                SWS_FAST_BILINEAR | SWS_PRINT_INFO,
                NULL, NULL, NULL);
-                               
+               
+       if (!anim->img_convert_ctx) {
+               fprintf (stderr,
+                        "Can't transform color space??? Bailing out...\n");
+               avcodec_close(anim->pCodecCtx);
+               av_close_input_file(anim->pFormatCtx);
+               av_free(anim->pFrameRGB);
+               av_free(anim->pFrameDeinterlaced);
+               av_free(anim->pFrame);
+               anim->pCodecCtx = NULL;
+               return -1;
+       }
+               
        return (0);
 }
 


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to