From 610d20dbf0d738afddc2d65a0f978a18f6709edc Mon Sep 17 00:00:00 2001 From: phintuka Date: Mon, 19 Oct 2009 11:27:11 +0000 Subject: (Cosmetics:) Copy palette only if all objects have been found --- xine/BluRay/decode_spuhdmv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xine/BluRay/decode_spuhdmv.c b/xine/BluRay/decode_spuhdmv.c index bd1587f6..bae201e8 100644 --- a/xine/BluRay/decode_spuhdmv.c +++ b/xine/BluRay/decode_spuhdmv.c @@ -643,11 +643,6 @@ static int show_overlay(spuhdmv_decoder_t *this, composition_object_t *cobj, uin 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) @@ -666,6 +661,11 @@ static int show_overlay(spuhdmv_decoder_t *this, composition_object_t *cobj, uin 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