[dvblast-devel] initialize default loop

Christophe Massiot git at videolan.org
Fri Jul 31 17:57:06 CEST 2015


dvblast | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Fri Jul 31 17:56:55 2015 +0200| [04415308fb243c9f0de7500ee7c73383e3d70e67] | committer: Christophe Massiot

initialize default loop

> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=04415308fb243c9f0de7500ee7c73383e3d70e67
---

 dvblast.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dvblast.c b/dvblast.c
index fc5dac4..70828c1 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -694,7 +694,6 @@ int main( int i_argc, char **pp_argv )
     struct ev_signal sigint_watcher, sigterm_watcher, sighup_watcher;
     struct ev_timer quit_watcher;
 
-    event_loop = EV_DEFAULT;
     print_fh = stdout;
 
     if ( i_argc == 1 )
@@ -1159,6 +1158,12 @@ int main( int i_argc, char **pp_argv )
         b_dvb_global = true;
     }
 
+    if ((event_loop = ev_default_loop(0)) == NULL)
+    {
+        msg_Err( NULL, "unable to initialize libev" );
+        exit(EXIT_FAILURE);
+    }
+
     memset( &output_dup, 0, sizeof(output_dup) );
     if ( psz_dup_config != NULL )
     {



More information about the dvblast-devel mailing list