[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28399] trunk/blender: Fix for #22135, loading ffmpeg now before .B25.blend is loaded.
Joerg Mueller
nexyon at gmail.com
Sat Apr 24 18:35:16 CEST 2010
Revision: 28399
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28399
Author: nexyon
Date: 2010-04-24 18:35:16 +0200 (Sat, 24 Apr 2010)
Log Message:
-----------
Fix for #22135, loading ffmpeg now before .B25.blend is loaded.
Modified Paths:
--------------
trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
trunk/blender/intern/audaspace/intern/AUD_C-API.h
trunk/blender/source/blender/blenkernel/BKE_sound.h
trunk/blender/source/blender/blenkernel/intern/sound.c
trunk/blender/source/creator/creator.c
Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-04-24 12:37:17 UTC (rev 28398)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-04-24 16:35:16 UTC (rev 28399)
@@ -84,11 +84,15 @@
static int AUD_available_devices[4];
static AUD_I3DDevice* AUD_3ddevice = NULL;
-int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+void AUD_initOnce()
{
#ifdef WITH_FFMPEG
av_register_all();
#endif
+}
+
+int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+{
AUD_IDevice* dev = NULL;
if(AUD_device)
Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.h
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.h 2010-04-24 12:37:17 UTC (rev 28398)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.h 2010-04-24 16:35:16 UTC (rev 28399)
@@ -56,6 +56,11 @@
#endif
/**
+ * Initializes FFMPEG if it is enabled.
+ */
+extern void AUD_initOnce();
+
+/**
* Initializes an audio device.
* \param device The device type that should be used.
* \param specs The audio specification to be used.
Modified: trunk/blender/source/blender/blenkernel/BKE_sound.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_sound.h 2010-04-24 12:37:17 UTC (rev 28398)
+++ trunk/blender/source/blender/blenkernel/BKE_sound.h 2010-04-24 16:35:16 UTC (rev 28399)
@@ -38,6 +38,8 @@
struct Main;
struct Sequence;
+void sound_init_once();
+
void sound_init(struct Main *main);
void sound_exit();
Modified: trunk/blender/source/blender/blenkernel/intern/sound.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sound.c 2010-04-24 12:37:17 UTC (rev 28398)
+++ trunk/blender/source/blender/blenkernel/intern/sound.c 2010-04-24 16:35:16 UTC (rev 28399)
@@ -73,6 +73,11 @@
force_device = device;
}
+void sound_init_once()
+{
+ AUD_initOnce();
+}
+
void sound_init(struct Main *bmain)
{
AUD_DeviceSpecs specs;
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2010-04-24 12:37:17 UTC (rev 28398)
+++ trunk/blender/source/creator/creator.c 2010-04-24 16:35:16 UTC (rev 28399)
@@ -1001,6 +1001,10 @@
/* background render uses this font too */
BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size);
+
+ /* Initialiaze ffmpeg if built in, also needed for bg mode if videos are
+ rendered via ffmpeg */
+ sound_init_once();
init_def_material();
@@ -1015,11 +1019,13 @@
#ifndef DISABLE_SDL
BLI_setenv("SDL_VIDEODRIVER", "dummy");
+/* I think this is not necessary anymore (04-24-2010 neXyon)
#ifdef __linux__
- /* On linux the default SDL driver dma often would not play
- * use alsa if none is set */
+ // On linux the default SDL driver dma often would not play
+ // use alsa if none is set
setenv("SDL_AUDIODRIVER", "alsa", 0);
#endif
+*/
#endif
}
else {
More information about the Bf-blender-cvs
mailing list