diff options
author | Mike Melanson <mike@multimedia.cx> | 2003-09-12 03:48:14 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2003-09-12 03:48:14 +0000 |
commit | ba118447d561a18b35e719f1249a6d578e237c4b (patch) | |
tree | 3dd2990a29c392df2c2d96c04fb5f34ca97a266c /libavcodec/xan.c | |
parent | 50f52fcdc3e6a5a7ee6991360a4dcf4a36975ed6 (diff) | |
download | ffmpeg-ba118447d561a18b35e719f1249a6d578e237c4b.tar.gz |
deploy palette control API
Originally committed as revision 2266 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r-- | libavcodec/xan.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c index fa41c1da9b..918048f45f 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -115,9 +115,9 @@ static int xan_decode_init(AVCodecContext *avctx) 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 @@ static int xan_decode_frame(AVCodecContext *avctx, 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; } |