mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-21 11:14:02 -04: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"
|
# include "getopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
|
||||||
/** Seconds to sleep before checking for a shutdown or reload */
|
/** Seconds to sleep before checking for a shutdown or reload */
|
||||||
#define MAIN_SLEEP_INTERVAL 2
|
#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",
|
DPRINTF(E_LOG,L_MAIN,"Firefly Version %s: Starting with debuglevel %d\n",
|
||||||
VERSION,err_getlevel());
|
VERSION,err_getlevel());
|
||||||
|
|
||||||
|
/* initialize ffmpeg */
|
||||||
|
av_register_all();
|
||||||
|
|
||||||
/* load plugins before we drop privs? Maybe... let the
|
/* load plugins before we drop privs? Maybe... let the
|
||||||
* plugins do stuff they might need to */
|
* plugins do stuff they might need to */
|
||||||
|
@ -131,7 +131,8 @@ char *ssc_ffmpeg_error(void *pv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PLUGIN_INFO *plugin_info(void) {
|
PLUGIN_INFO *plugin_info(void) {
|
||||||
av_register_all();
|
/* Now done in main() */
|
||||||
|
/* av_register_all(); */
|
||||||
|
|
||||||
return &_pi;
|
return &_pi;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user