diff options
author | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-05 00:59:50 +0000 |
---|---|---|
committer | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-05 00:59:50 +0000 |
commit | 6765a1f8c70ab83b4aedae8b8cf381fb7507c408 (patch) | |
tree | 438cba0663887969be52d3c51bafabe0d57f5650 /src/xine-engine/video_decoder.c | |
parent | 064f7ccd126415f062676ec4ccc9efdba8eff154 (diff) | |
download | xine-lib-6765a1f8c70ab83b4aedae8b8cf381fb7507c408.tar.gz xine-lib-6765a1f8c70ab83b4aedae8b8cf381fb7507c408.tar.bz2 |
Enabled CLUT palette transfer from the input plugin
to the libspudec. Fixed palette idx order.
CVS patchset: 385
CVS date: 2001/08/05 00:59:50
Diffstat (limited to 'src/xine-engine/video_decoder.c')
-rw-r--r-- | src/xine-engine/video_decoder.c | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index c71b4a51f..5b44e2758 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.33 2001/08/02 20:38:42 jcdutton Exp $ + * $Id: video_decoder.c,v 1.34 2001/08/05 00:59:51 ehasenle Exp $ * */ @@ -27,6 +27,23 @@ #include "xine_internal.h" +static spu_decoder_t* update_spu_decoder(xine_t *this, int type) { + int streamtype = (type>>16) & 0xFF; + spu_decoder_t *spu_decoder = this->spu_decoder_plugins [streamtype]; + + if (spu_decoder && this->cur_spu_decoder_plugin != spu_decoder) { + + if (this->cur_spu_decoder_plugin) + this->cur_spu_decoder_plugin->close (this->cur_spu_decoder_plugin); + + this->cur_spu_decoder_plugin = spu_decoder; + + this->cur_spu_decoder_plugin->init (this->cur_spu_decoder_plugin, + this->video_out); + } + return spu_decoder; +} + void *video_decoder_loop (void *this_gen) { buf_element_t *buf; @@ -75,28 +92,22 @@ void *video_decoder_loop (void *this_gen) { break; - case BUF_SPU_PACKAGE: - /* now, decode this buffer if it's the right track */ - - if ( (buf->type & 0xFFFF)== this->spu_channel) { - - int streamtype = (buf->type>>16) & 0xFF; - spu_decoder = this->spu_decoder_plugins [streamtype]; - if (spu_decoder) { - if (this->cur_spu_decoder_plugin != spu_decoder) { - - if (this->cur_spu_decoder_plugin) - this->cur_spu_decoder_plugin->close (this->cur_spu_decoder_plugin); - - this->cur_spu_decoder_plugin = spu_decoder; + case BUF_SPU_CLUT: + spu_decoder = update_spu_decoder(this, buf->type); - this->cur_spu_decoder_plugin->init (this->cur_spu_decoder_plugin, this->video_out); - } + if (spu_decoder) + spu_decoder->decode_data (spu_decoder, buf); + break; - spu_decoder->decode_data (spu_decoder, buf); - } - } + case BUF_SPU_PACKAGE: + /* now, decode this buffer if it's the right track */ + if ( (buf->type & 0xFFFF)== this->spu_channel) { + spu_decoder = update_spu_decoder (this, buf->type); + if (spu_decoder) + spu_decoder->decode_data (spu_decoder, buf); + } + break; case BUF_VIDEO_MPEG: case BUF_VIDEO_AVI: |