summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 16:24:03 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 16:24:03 +0200
commit1277177277eb14e7da35331b34af5e4b442a60cb (patch)
tree7792290713e500914c728c4fca8c3c97a834eb61 /src
parent3610d5b8dbdee81b15c0b09f5e7b35dbd3a05be2 (diff)
downloadxine-lib-1277177277eb14e7da35331b34af5e4b442a60cb.tar.gz
xine-lib-1277177277eb14e7da35331b34af5e4b442a60cb.tar.bz2
Update code style.
--HG-- extra : transplant_source : %D0%D6%EB%ACQ%28%9B1i%21%A4%8F%BB%A3%CF%5E%BC%CB%5E%A3
Diffstat (limited to 'src')
-rw-r--r--src/libspudec/xine_spu_decoder.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/libspudec/xine_spu_decoder.c b/src/libspudec/xine_spu_decoder.c
index c604686e9..e63bdf8b9 100644
--- a/src/libspudec/xine_spu_decoder.c
+++ b/src/libspudec/xine_spu_decoder.c
@@ -68,11 +68,9 @@ static const clut_t default_clut[] = {
};
static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
- uint32_t stream_id;
- spudec_seq_t *cur_seq;
spudec_decoder_t *this = (spudec_decoder_t *) this_gen;
- stream_id = buf->type & 0x1f ;
- cur_seq = &this->spudec_stream_state[stream_id].ra_seq;
+ const uint8_t stream_id = buf->type & 0x1f ;
+ spudec_seq_t *cur_seq = &this->spudec_stream_state[stream_id].ra_seq;
#ifdef LOG_DEBUG
printf("libspudec:got buffer type = %x\n", buf->type);
@@ -177,7 +175,6 @@ static void spudec_discontinuity (spu_decoder_t *this_gen) {
static void spudec_dispose (spu_decoder_t *this_gen) {
spudec_decoder_t *this = (spudec_decoder_t *) this_gen;
- int i;
video_overlay_manager_t *ovl_manager = this->stream->video_out->get_overlay_manager (this->stream->video_out);
if( this->menu_handle >= 0 )
@@ -185,6 +182,7 @@ static void spudec_dispose (spu_decoder_t *this_gen) {
this->menu_handle);
this->menu_handle = -1;
+ int i;
for (i=0; i < MAX_STREAMS; i++) {
if( this->spudec_stream_state[i].overlay_handle >= 0 )
ovl_manager->free_handle(ovl_manager,
@@ -225,11 +223,9 @@ static void spudec_set_button (spu_decoder_t *this_gen, int32_t button, int32_t
* when video_overlay does menus */
video_overlay_manager_t *ovl_manager;
- video_overlay_event_t *overlay_event = NULL;
- vo_overlay_t *overlay = NULL;
- overlay_event = calloc(1, sizeof(video_overlay_event_t));
+ video_overlay_event_t *overlay_event = calloc(1, sizeof(video_overlay_event_t));
+ vo_overlay_t *overlay = calloc(1, sizeof(vo_overlay_t));
- overlay = calloc(1, sizeof(vo_overlay_t));
/* FIXME: Watch out for threads. We should really put a lock on this
* because events is a different thread than decode_data */
@@ -313,7 +309,6 @@ static void spudec_set_button (spu_decoder_t *this_gen, int32_t button, int32_t
static spu_decoder_t *open_plugin (spu_decoder_class_t *class_gen, xine_stream_t *stream) {
spudec_decoder_t *this ;
- int i;
this = (spudec_decoder_t *) calloc(1, sizeof (spudec_decoder_t));
@@ -337,6 +332,8 @@ static spu_decoder_t *open_plugin (spu_decoder_class_t *class_gen, xine_stream_t
this->ovl_caps = stream->video_out->get_capabilities(stream->video_out);
this->output_open = 0;
this->last_event_vpts = 0;
+
+ int i;
for (i=0; i < MAX_STREAMS; i++) {
this->spudec_stream_state[i].ra_seq.complete = 1;
this->spudec_stream_state[i].overlay_handle = -1;