diff mpegvideo.c @ 4281:de525a2b41db libavcodec

ff_check_alignment to warn the user about a missaligned stack
author michael
date Thu, 07 Dec 2006 18:33:00 +0000
parents 07625477adfa
children d6f83e2f8804
line wrap: on
line diff
--- a/mpegvideo.c	Thu Dec 07 18:29:02 2006 +0000
+++ b/mpegvideo.c	Thu Dec 07 18:33:00 2006 +0000
@@ -4838,6 +4838,8 @@
 static int estimate_motion_thread(AVCodecContext *c, void *arg){
     MpegEncContext *s= arg;
 
+    ff_check_alignment();
+
     s->me.dia_size= s->avctx->dia_size;
     s->first_slice_line=1;
     for(s->mb_y= s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {
@@ -4864,6 +4866,8 @@
     MpegEncContext *s= arg;
     int mb_x, mb_y;
 
+    ff_check_alignment();
+
     for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
         for(mb_x=0; mb_x < s->mb_width; mb_x++) {
             int xx = mb_x * 16;
@@ -4911,6 +4915,8 @@
     PutBitContext pb[2], pb2[2], tex_pb[2];
 //printf("%d->%d\n", s->resync_mb_y, s->end_mb_y);
 
+    ff_check_alignment();
+
     for(i=0; i<2; i++){
         init_put_bits(&pb    [i], bit_buf    [i], MAX_MB_BYTES);
         init_put_bits(&pb2   [i], bit_buf2   [i], MAX_MB_BYTES);