summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2014-04-29 10:21:18 +0000
committerphintuka <phintuka>2014-04-29 10:21:18 +0000
commit157723acfab2b9f49dc176f3a72af3d6d476d0a5 (patch)
tree88643ef6b73b527d9c9dfe093b5497e153d96a49
parentdf9cde449625ef66798f650f78aa9add2da71cbc (diff)
downloadxineliboutput-157723acfab2b9f49dc176f3a72af3d6d476d0a5.tar.gz
xineliboutput-157723acfab2b9f49dc176f3a72af3d6d476d0a5.tar.bz2
Fix crash with some libcec versions
-rw-r--r--xine_frontend_cec.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/xine_frontend_cec.c b/xine_frontend_cec.c
index 6ec42554..02e44f0c 100644
--- a/xine_frontend_cec.c
+++ b/xine_frontend_cec.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_cec.c,v 1.2 2014-04-29 10:03:18 phintuka Exp $
+ * $Id: xine_frontend_cec.c,v 1.3 2014-04-29 10:21:18 phintuka Exp $
*
*/
@@ -232,6 +232,16 @@ static int cec_command_cb(void *this_gen, const cec_command command)
return 1;
}
+ICECCallbacks callbacks = {
+ .CBCecKeyPress = cec_keypress_cb,
+ .CBCecCommand = cec_command_cb,
+ .CBCecLogMessage = cec_log_cb,
+ .CBCecAlert = cec_alert_cb,
+ .CBCecConfigurationChanged = cec_config_changed_cb,
+ .CBCecSourceActivated = cec_source_activated_cb,
+ .CBCecMenuStateChanged = cec_menu_state_changed_cb,
+};
+
/*
* configuration
*/
@@ -338,15 +348,6 @@ static int detect_hdmi_address(frontend_t *fe_gen)
static int libcec_init(void *fe_gen)
{
libcec_configuration config;
- ICECCallbacks callbacks = {
- .CBCecKeyPress = cec_keypress_cb,
- .CBCecCommand = cec_command_cb,
- .CBCecLogMessage = cec_log_cb,
- .CBCecAlert = cec_alert_cb,
- .CBCecConfigurationChanged = cec_config_changed_cb,
- .CBCecSourceActivated = cec_source_activated_cb,
- .CBCecMenuStateChanged = cec_menu_state_changed_cb,
- };
libcec_config_clear(&config);