[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14393] trunk/blender/source/blender/ quicktime/apple/quicktime_export.c:

Brecht Van Lommel brechtvanlommel at pandora.be
Sat Apr 12 15:49:00 CEST 2008


Revision: 14393
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14393
Author:   blendix
Date:     2008-04-12 15:49:00 +0200 (Sat, 12 Apr 2008)

Log Message:
-----------

Fix for bug #5862: crash rendering to quicktime h.264. This would need
an upgrade to the new quicktime api to work, but that's not really
compatible with rendering out frames sequentially. For now it sets the
compression to minimum quality, which doesn't need seeking forward and
backwards.

Modified Paths:
--------------
    trunk/blender/source/blender/quicktime/apple/quicktime_export.c

Modified: trunk/blender/source/blender/quicktime/apple/quicktime_export.c
===================================================================
--- trunk/blender/source/blender/quicktime/apple/quicktime_export.c	2008-04-12 13:00:01 UTC (rev 14392)
+++ trunk/blender/source/blender/quicktime/apple/quicktime_export.c	2008-04-12 13:49:00 UTC (rev 14393)
@@ -311,6 +311,7 @@
 
 static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, int recty)
 {
+	SCTemporalSettings gTemporalSettings;
 	OSErr err = noErr;
 
 	qtexport->ibuf = IMB_allocImBuf (rectx, recty, 32, IB_rect, 0);
@@ -329,7 +330,18 @@
 
 	SCDefaultPixMapSettings (qtdata->theComponent, qtexport->thePixMap, true);
 
-	SCSetInfo(qtdata->theComponent, scTemporalSettingsType,	&qtdata->gTemporalSettings);
+	// workaround for crash with H.264, which requires an upgrade to
+	// the new callback based api for proper encoding, but that's not
+	// really compatible with rendering out frames sequentially
+	gTemporalSettings = qtdata->gTemporalSettings;
+	if(qtdata->gSpatialSettings.codecType == kH264CodecType) {
+		if(gTemporalSettings.temporalQuality != codecMinQuality) {
+			fprintf(stderr, "Only minimum quality compression supported for QuickTime H.264.\n");
+			gTemporalSettings.temporalQuality = codecMinQuality;
+		}
+	}
+
+	SCSetInfo(qtdata->theComponent, scTemporalSettingsType,	&gTemporalSettings);
 	SCSetInfo(qtdata->theComponent, scSpatialSettingsType,	&qtdata->gSpatialSettings);
 	SCSetInfo(qtdata->theComponent, scDataRateSettingsType,	&qtdata->aDataRateSetting);
 





More information about the Bf-blender-cvs mailing list