Mercurial > libavcodec.hg
diff xan.c @ 1462:eabd6b8f83ed libavcodec
deploy palette control API
author | tmmm |
---|---|
date | Fri, 12 Sep 2003 03:48:14 +0000 |
parents | 4d2098e8c875 |
children | 51239e385475 |
line wrap: on
line diff
--- a/xan.c Thu Sep 11 22:51:05 2003 +0000 +++ b/xan.c Fri Sep 12 03:48:14 2003 +0000 @@ -115,9 +115,9 @@ s->avctx = avctx; if ((avctx->codec->id == CODEC_ID_XAN_WC3) && - (s->avctx->extradata_size != PALETTE_CONTROL_SIZE)) { + (s->avctx->extradata_size != sizeof(AVPaletteControl))) { printf (" WC3 Xan video: expected extradata_size of %d\n", - PALETTE_CONTROL_SIZE); + sizeof(AVPaletteControl)); return -1; } @@ -809,13 +809,13 @@ uint8_t *buf, int buf_size) { XanContext *s = avctx->priv_data; - unsigned char *palette_control = avctx->extradata; + AVPaletteControl *palette_control = (AVPaletteControl *)avctx->extradata; int keyframe = 0; - if (palette_control[0]) { + if (palette_control->palette_changed) { /* load the new palette and reset the palette control */ - xan_wc3_build_palette(s, &palette_control[1]); - palette_control[0] = 0; + xan_wc3_build_palette(s, palette_control->palette); + palette_control->palette_changed = 0; keyframe = 1; }