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.
This commit is contained in:
Julien BLACHE 2009-04-05 13:13:09 +02:00
parent c9107ed48c
commit 3a53a068af
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,7 @@
# include "getopt.h"
#endif
#include <libavformat/avformat.h>
/** 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 */

View File

@ -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;
}