diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-17 23:36:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-17 23:43:54 +0200 |
commit | c40798441f47341c310b38e8f329cfb943924faf (patch) | |
tree | c23fbec614c59bcf14c7377d1c6ff7abdfa34353 /libavcodec/idcinvideo.c | |
parent | c96786008172f669e546ca987e7aaa3c3469be71 (diff) | |
parent | fd0c3403f611d31b944216cfa1585a2d28f7f0da (diff) | |
download | ffmpeg-c40798441f47341c310b38e8f329cfb943924faf.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
ac3dec: fix processing of delta bit allocation information.
vc1: fix fate-vc1 after previous commit.
wmv3dec: fix playback of complex WMV3 files using simple_idct.
make av_dup_packet() more cautious on allocation failures
make containers pass palette change in AVPacket
introduce side information for AVPacket
Politic commits that have not been pulled:
Update regtest checksums after revision 6001dad.
Replace more FFmpeg references by Libav.
Replace references to ffmpeg-devel with libav-devel; fix roundup URL.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/idcinvideo.c')
-rw-r--r-- | libavcodec/idcinvideo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c index 64421db19a..ab0697252b 100644 --- a/libavcodec/idcinvideo.c +++ b/libavcodec/idcinvideo.c @@ -72,6 +72,7 @@ typedef struct IdcinContext { hnode huff_nodes[256][HUF_TOKENS*2]; int num_huff_nodes[256]; + uint32_t pal[256]; } IdcinContext; /* @@ -213,7 +214,7 @@ static int idcin_decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; IdcinContext *s = avctx->priv_data; - AVPaletteControl *palette_control = avctx->palctrl; + const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); s->buf = buf; s->size = buf_size; @@ -228,13 +229,12 @@ static int idcin_decode_frame(AVCodecContext *avctx, idcin_decode_vlcs(s); - /* make the palette available on the way out */ - memcpy(s->frame.data[1], palette_control->palette, PALETTE_COUNT * 4); - /* If palette changed inform application*/ - if (palette_control->palette_changed) { - palette_control->palette_changed = 0; + if (pal) { s->frame.palette_has_changed = 1; + memcpy(s->pal, pal, AVPALETTE_SIZE); } + /* make the palette available on the way out */ + memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE); *data_size = sizeof(AVFrame); *(AVFrame*)data = s->frame; |