From 4345dc27aa5bb6b816759f3d7276baad601ff5bd Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 3 Nov 2009 21:34:50 +0200 Subject: =?UTF-8?q?Copy=20palette=20only=20if=20all=20objects=20have=20bee?= =?UTF-8?q?n=20found;=20ERROR=E2=86=92TRACE=20in=20show=5Foverlay().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libspuhdmv/xine_hdmv_decoder.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/libspuhdmv/xine_hdmv_decoder.c b/src/libspuhdmv/xine_hdmv_decoder.c index 96acf0c11..1a6b71523 100644 --- a/src/libspuhdmv/xine_hdmv_decoder.c +++ b/src/libspuhdmv/xine_hdmv_decoder.c @@ -74,9 +74,11 @@ struct subtitle_object_s { uint num_rle; size_t data_size; +#if 0 uint8_t *raw_data; /* partial RLE data in HDMV format */ size_t raw_data_len; size_t raw_data_size; +#endif subtitle_object_t *next; }; @@ -619,21 +621,16 @@ static int show_overlay(spuhdmv_decoder_t *this, composition_object_t *cobj, uin while (clut && clut->id != palette_id_ref) clut = clut->next; if (!clut) { - ERROR(" fill_overlay: clut %d not found !\n", palette_id_ref); + TRACE(" show_overlay: clut %d not found !\n", palette_id_ref); return -1; } - /* copy palette to xine overlay */ - overlay.rgb_clut = 0; - memcpy(overlay.color, clut->color, sizeof(uint32_t) * 256); - memcpy(overlay.trans, clut->trans, sizeof(uint8_t) * 256); - /* find RLE image */ subtitle_object_t *obj = this->objects; while (obj && obj->id != cobj->object_id_ref) obj = obj->next; if (!obj) { - ERROR(" fill_overlay: object %d not found !\n", cobj->object_id_ref); + TRACE(" show_overlay: object %d not found !\n", cobj->object_id_ref); return -1; } @@ -642,10 +639,15 @@ static int show_overlay(spuhdmv_decoder_t *this, composition_object_t *cobj, uin while (wnd && wnd->id != cobj->window_id_ref) wnd = wnd->next; if (!wnd) { - ERROR(" fill_overlay: window %d not found !\n", cobj->window_id_ref); + TRACE(" show_overlay: window %d not found !\n", cobj->window_id_ref); return -1; } + /* copy palette to xine overlay */ + overlay.rgb_clut = 0; + memcpy(overlay.color, clut->color, sizeof(uint32_t) * 256); + memcpy(overlay.trans, clut->trans, sizeof(uint8_t) * 256); + /* copy and crop RLE image to xine overlay */ overlay.width = obj->width; overlay.height = obj->height; -- cgit v1.2.3