use assignment of structure instead of memcpy
authorStefan Gehrer <stefan.gehrer@gmx.de>
Fri, 16 Jan 2009 17:58:38 +0000 (17:58 +0000)
committerStefan Gehrer <stefan.gehrer@gmx.de>
Fri, 16 Jan 2009 17:58:38 +0000 (17:58 +0000)
Originally committed as revision 16644 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/cavsdec.c

index 38a7681..dbf7252 100644 (file)
@@ -567,8 +567,8 @@ static int decode_pic(AVSContext *h) {
     if(h->pic_type != FF_B_TYPE) {
         if(h->DPB[1].data[0])
             s->avctx->release_buffer(s->avctx, (AVFrame *)&h->DPB[1]);
-        memcpy(&h->DPB[1], &h->DPB[0], sizeof(Picture));
-        memcpy(&h->DPB[0], &h->picture, sizeof(Picture));
+        h->DPB[1] = h->DPB[0];
+        h->DPB[0] = h->picture;
         memset(&h->picture,0,sizeof(Picture));
     }
     return 0;