mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 00:05:03 -05:00
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:
parent
c9107ed48c
commit
3a53a068af
@ -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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user