dont use memcpy for copying structs
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Jul 2006 12:40:39 +0000 (12:40 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Jul 2006 12:40:39 +0000 (12:40 +0000)
Originally committed as revision 5574 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/flacenc.c

index 2c1964b..1ec09bb 100644 (file)
@@ -529,7 +529,7 @@ static uint32_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
         bits[i] = calc_optimal_rice_params(&tmp_rc, i, sums[i], n, pred_order);
         if(bits[i] <= bits[opt_porder]) {
             opt_porder = i;
-            memcpy(rc, &tmp_rc, sizeof(RiceContext));
+            *rc= tmp_rc;
         }
     }