Fix for #22135, loading ffmpeg now before .B25.blend is loaded.
This commit is contained in:
@@ -84,11 +84,15 @@ static AUD_IDevice* AUD_device = NULL;
|
||||
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)
|
||||
|
||||
@@ -55,6 +55,11 @@ typedef struct
|
||||
typedef void (*AUD_syncFunction)(void*, int, float);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes FFMPEG if it is enabled.
|
||||
*/
|
||||
extern void AUD_initOnce();
|
||||
|
||||
/**
|
||||
* Initializes an audio device.
|
||||
* \param device The device type that should be used.
|
||||
|
||||
@@ -38,6 +38,8 @@ struct ListBase;
|
||||
struct Main;
|
||||
struct Sequence;
|
||||
|
||||
void sound_init_once();
|
||||
|
||||
void sound_init(struct Main *main);
|
||||
|
||||
void sound_exit();
|
||||
|
||||
@@ -73,6 +73,11 @@ void sound_force_device(int device)
|
||||
force_device = device;
|
||||
}
|
||||
|
||||
void sound_init_once()
|
||||
{
|
||||
AUD_initOnce();
|
||||
}
|
||||
|
||||
void sound_init(struct Main *bmain)
|
||||
{
|
||||
AUD_DeviceSpecs specs;
|
||||
|
||||
@@ -1001,6 +1001,10 @@ int main(int argc, char **argv)
|
||||
|
||||
/* 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 @@ int main(int argc, char **argv)
|
||||
|
||||
#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 {
|
||||
|
||||
Reference in New Issue
Block a user