From 8360c14f14868663de898df1ea47839768d4afd6 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 21 May 2013 12:18:35 +0000 Subject: Fix #35443: Animation player doesn't play some movie formats Need to initialize FFmpeg for animation player. This is a bit confusing, but the only way to do this properly and clear is to call IMB_ffmpeg_init from playback_mode command line callback. This is because this callback is blocking and "usual" FFmpeg initializetion (which happens after command line parsing) was never called. Could be switched to separate FFmpeg initializtion and debug level set but let's keep simple for now. --- source/creator/creator.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 418c05e22ce..34bf541a720 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -634,6 +634,11 @@ static int playback_mode(int argc, const char **argv, void *UNUSED(data)) { /* not if -b was given first */ if (G.background == 0) { +#ifdef WITH_FFMPEG + /* Setup FFmpeg with current debug flags. */ + IMB_ffmpeg_init(); +#endif + WM_main_playanim(argc, argv); /* not the same argc and argv as before */ exit(0); /* 2.4x didn't do this */ } -- cgit v1.2.3