diff options
author | phintuka <phintuka> | 2008-06-14 04:24:20 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-06-14 04:24:20 +0000 |
commit | 93bba7d79e18e41f00a5a49ee8b4e63d9f9f9d14 (patch) | |
tree | 30ed87eebab65b674cfda9a0a45d352002387b01 | |
parent | fb76f67900d298577725c289f1c6f285848dadc1 (diff) | |
download | xineliboutput-93bba7d79e18e41f00a5a49ee8b4e63d9f9f9d14.tar.gz xineliboutput-93bba7d79e18e41f00a5a49ee8b4e63d9f9f9d14.tar.bz2 |
Init structs in declaration
-rw-r--r-- | xine_frontend.c | 41 | ||||
-rw-r--r-- | xine_sxfe_frontend.c | 17 |
2 files changed, 22 insertions, 36 deletions
diff --git a/xine_frontend.c b/xine_frontend.c index 61f19e77..5e45b0f7 100644 --- a/xine_frontend.c +++ b/xine_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.56 2008-05-21 20:06:45 phintuka Exp $ + * $Id: xine_frontend.c,v 1.57 2008-06-14 04:24:20 phintuka Exp $ * */ @@ -257,16 +257,18 @@ static void fe_frame_output_cb (void *data, ((double)video_width)/((double)video_height))); if(this->video_width != video_width || this->video_height != video_height) { - xine_event_t event; - xine_format_change_data_t framedata; - event.type = XINE_EVENT_FRAME_FORMAT_CHANGE; - event.stream = this->stream; - event.data = &framedata; - event.data_length = sizeof(framedata); - framedata.width = video_width; - framedata.height = video_height; - framedata.aspect = 0; /* TODO */ - framedata.pan_scan = 0; + xine_format_change_data_t framedata = { + .width = video_width, + .height = video_height, + .aspect = 0, /* TODO */ + .pan_scan = 0, + }; + const xine_event_t event = { + .type = XINE_EVENT_FRAME_FORMAT_CHANGE, + .stream = this->stream, + .data = &framedata, + .data_length = sizeof(framedata), + }; xine_event_send(this->stream, &event); this->video_width = video_width; this->video_height = video_height; @@ -1224,23 +1226,6 @@ static int xine_queue_pes_packet(frontend_t *this_gen, const char *data, int len if(!this->input && !find_input(this)) return 0/*-1*/; -#if 0 - if(len<6) { - LOGMSG("xine_queue_pes_packet: len == %d, too short!", len); - abort(); - } - /* must contain single pes packet and nothing else */ - if(data[0] || data[1] || (data[2] != 1)) { - static int counter=0; - counter++; - LOGMSG("xine_queue_pes_packet: packet not starting with 00 00 01 \n" - " packet #%d, size=%d : %02x %02x %02x %02x %02x %02x\n", - counter, len, - data[0], data[1], data[2], data[3], data[4], data[5]); - abort(); - } -#endif - input_vdr = (vdr_input_plugin_t *)this->input; return input_vdr->f.push_input_write(this->input, data, len); } diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c index 107dc32c..1e5ca876 100644 --- a/xine_sxfe_frontend.c +++ b/xine_sxfe_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_sxfe_frontend.c,v 1.56 2008-06-13 21:29:16 phintuka Exp $ + * $Id: xine_sxfe_frontend.c,v 1.57 2008-06-14 04:24:20 phintuka Exp $ * */ @@ -1233,15 +1233,16 @@ static void sxfe_toggle_fullscreen(sxfe_t *this) static void sxfe_interrupt(frontend_t *this_gen) { sxfe_t *this = (sxfe_t*)this_gen; - XClientMessageEvent ev2; - ev2.type = ClientMessage; - ev2.display = this->display; - ev2.window = this->window[this->fullscreen ? 1 : 0]; - ev2.message_type = this->xa_SXFE_INTERRUPT; - ev2.format = 32; + XClientMessageEvent event = { + .type = ClientMessage, + .display = this->display, + .window = this->window[this->fullscreen ? 1 : 0], + .message_type = this->xa_SXFE_INTERRUPT, + .format = 32, + }; - if(!XSendEvent(ev2.display, ev2.window, TRUE, /*KeyPressMask*/0, (XEvent *)&ev2)) + if(!XSendEvent(event.display, event.window, TRUE, /*KeyPressMask*/0, (XEvent *)&event)) LOGERR("sxfe_interrupt: XSendEvent(ClientMessage) FAILED\n"); XFlush(this->display); |