mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-11 06:58:18 +00:00
Do proper frame swapping so VMD video decoder works again
Originally committed as revision 9151 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
822dc0b820
commit
3dba31aa0d
@ -380,14 +380,13 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
/* make the palette available on the way out */
|
/* make the palette available on the way out */
|
||||||
memcpy(s->frame.data[1], s->palette, PALETTE_COUNT * 4);
|
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 */
|
/* 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);
|
*data_size = sizeof(AVFrame);
|
||||||
*(AVFrame*)data = s->frame;
|
*(AVFrame*)data = s->prev_frame;
|
||||||
|
|
||||||
/* report that the buffer was completely consumed */
|
/* report that the buffer was completely consumed */
|
||||||
return buf_size;
|
return buf_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user