From 3a53a068afc8caa05d5694bb23f00abd94c6c7dc Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 5 Apr 2009 13:13:09 +0200 Subject: [PATCH] Initialize ffmpeg in main() ffmpeg needs to be initialized before scanning songs at startup. As a consequence, the ffmpeg plugin does not need to call av_register_all() itself anymore. --- src/main.c | 3 +++ src/plugins/ssc-ffmpeg.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 66d7e460..e171a4d7 100644 --- a/src/main.c +++ b/src/main.c @@ -94,6 +94,7 @@ # include "getopt.h" #endif +#include /** Seconds to sleep before checking for a shutdown or reload */ #define MAIN_SLEEP_INTERVAL 2 @@ -431,6 +432,8 @@ int main(int argc, char *argv[]) { DPRINTF(E_LOG,L_MAIN,"Firefly Version %s: Starting with debuglevel %d\n", VERSION,err_getlevel()); + /* initialize ffmpeg */ + av_register_all(); /* load plugins before we drop privs? Maybe... let the * plugins do stuff they might need to */ diff --git a/src/plugins/ssc-ffmpeg.c b/src/plugins/ssc-ffmpeg.c index 3fc77187..7cf6f1b2 100644 --- a/src/plugins/ssc-ffmpeg.c +++ b/src/plugins/ssc-ffmpeg.c @@ -131,7 +131,8 @@ char *ssc_ffmpeg_error(void *pv) { } PLUGIN_INFO *plugin_info(void) { - av_register_all(); + /* Now done in main() */ + /* av_register_all(); */ return &_pi; }