]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vmdav.c
Fix compilation when MMX is disabled.
[ffmpeg] / libavcodec / vmdav.c
index f10d57b3d7e582d9108f79a1ab8e44e848cd7521..5b8b8cf99b440364655c99e89e6037aa34f5b0a3 100644 (file)
@@ -45,7 +45,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "common.h"
 #include "avcodec.h"
 #include "dsputil.h"
 
@@ -381,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;