[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50445] trunk/blender/source/blender/ blenkernel/intern/writeffmpeg.c: fix [#32475] Enabled audio lets blender crash with autosplit option for movie output

Campbell Barton ideasman42 at gmail.com
Thu Sep 6 05:08:53 CEST 2012


Revision: 50445
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50445
Author:   campbellbarton
Date:     2012-09-06 03:08:47 +0000 (Thu, 06 Sep 2012)
Log Message:
-----------
fix [#32475] Enabled audio lets blender crash with autosplit option for movie output

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c

Modified: trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c	2012-09-06 02:20:03 UTC (rev 50444)
+++ trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c	2012-09-06 03:08:47 UTC (rev 50445)
@@ -946,6 +946,7 @@
 }
 
 void BKE_ffmpeg_end(void);
+static void end_ffmpeg_impl(int is_autosplit);
 
 #ifdef WITH_AUDASPACE
 static void write_audio_frames(double to_pts)
@@ -978,7 +979,7 @@
 
 		if (ffmpeg_autosplit) {
 			if (avio_tell(outfile->pb) > FFMPEG_AUTOSPLIT_SIZE) {
-				BKE_ffmpeg_end();
+				end_ffmpeg_impl(TRUE);
 				ffmpeg_autosplit_count++;
 				success &= start_ffmpeg_impl(rd, rectx, recty, reports);
 			}
@@ -991,7 +992,7 @@
 	return success;
 }
 
-void BKE_ffmpeg_end(void)
+static void end_ffmpeg_impl(int is_autosplit)
 {
 	unsigned int i;
 	
@@ -1004,9 +1005,11 @@
 #endif
 
 #ifdef WITH_AUDASPACE
-	if (audio_mixdown_device) {
-		AUD_closeReadDevice(audio_mixdown_device);
-		audio_mixdown_device = 0;
+	if (is_autosplit == FALSE) {
+		if (audio_mixdown_device) {
+			AUD_closeReadDevice(audio_mixdown_device);
+			audio_mixdown_device = 0;
+		}
 	}
 #endif
 
@@ -1069,6 +1072,11 @@
 	}
 }
 
+void BKE_ffmpeg_end(void)
+{
+	end_ffmpeg_impl(FALSE);
+}
+
 /* properties */
 
 void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)




More information about the Bf-blender-cvs mailing list