diff options
Diffstat (limited to 'src/libspudec/xine_spu_decoder.c')
-rw-r--r-- | src/libspudec/xine_spu_decoder.c | 17 |
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; |