summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2009-11-03 21:34:50 +0200
committerPetri Hintukainen <phintuka@users.sourceforge.net>2009-11-03 21:34:50 +0200
commit4345dc27aa5bb6b816759f3d7276baad601ff5bd (patch)
tree71180c41fc24f0ab699ed7dd504360993c0e8f91
parentf7ceeba7f05e6f511a70c5737740802685c18585 (diff)
downloadxine-lib-4345dc27aa5bb6b816759f3d7276baad601ff5bd.tar.gz
xine-lib-4345dc27aa5bb6b816759f3d7276baad601ff5bd.tar.bz2
Copy palette only if all objects have been found; ERROR→TRACE in show_overlay().
-rw-r--r--src/libspuhdmv/xine_hdmv_decoder.c18
1 files 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;