diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-05-29 16:43:25 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-05-29 16:43:25 +0000 |
commit | 3dba31aa0d5f0fdca5c002cea9c0757a90ec21f0 (patch) | |
tree | 330755e755ed81a5e9da7a1a8a007750bd312550 /libavcodec/vmdav.c | |
parent | 822dc0b8201a6f1fb6a7d9ebaa5d65090fc95b38 (diff) | |
download | ffmpeg-3dba31aa0d5f0fdca5c002cea9c0757a90ec21f0.tar.gz |
Do proper frame swapping so VMD video decoder works again
Originally committed as revision 9151 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vmdav.c')
-rw-r--r-- | libavcodec/vmdav.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index e1a5c4715c..5b8b8cf99b 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -380,14 +380,13 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx, /* make the palette available on the way out */ memcpy(s->frame.data[1], s->palette, PALETTE_COUNT * 4); - if (s->prev_frame.data[0]) - avctx->release_buffer(avctx, &s->prev_frame); - /* shuffle frames */ - s->prev_frame = s->frame; + FFSWAP(AVFrame, s->frame, s->prev_frame); + if (s->frame.data[0]) + avctx->release_buffer(avctx, &s->frame); *data_size = sizeof(AVFrame); - *(AVFrame*)data = s->frame; + *(AVFrame*)data = s->prev_frame; /* report that the buffer was completely consumed */ return buf_size; |