[FFmpeg-cvslog] Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.

Diego Biurrun git at videolan.org
Wed Sep 21 21:34:04 CEST 2011


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Sep 13 17:00:41 2011 +0200| [95a06eb4d59c5ab0ce53b0cc9d10d1b26be939e2] | committer: Diego Biurrun

Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.

This fixes build failures with -DDEBUG in CPPFLAGS.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95a06eb4d59c5ab0ce53b0cc9d10d1b26be939e2
---

 libavcodec/h261dec.c       |    4 ++--
 libavcodec/h264.c          |    2 +-
 libavcodec/h264_direct.c   |    4 ++--
 libavcodec/mpegvideo.c     |    4 ++--
 libavcodec/mpegvideo_enc.c |   10 +++++-----
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 63a153f..00375ef 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -620,8 +620,8 @@ retry:
     }
     MPV_frame_end(s);
 
-assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
-assert(s->current_picture.pict_type == s->pict_type);
+assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type);
+assert(s->current_picture.f.pict_type == s->pict_type);
     *pict= *(AVFrame*)s->current_picture_ptr;
     ff_print_debug_info(s, pict);
 
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d047448..9889224 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2722,7 +2722,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
         if (s0->first_field) {
             assert(s0->current_picture_ptr);
             assert(s0->current_picture_ptr->f.data[0]);
-            assert(s0->current_picture_ptr->reference != DELAYED_PIC_REF);
+            assert(s0->current_picture_ptr->f.reference != DELAYED_PIC_REF);
 
             /* figure out if we have a complementary field pair */
             if (!FIELD_PICTURE || s->picture_structure == last_pic_structure) {
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index c73aab3..4e05937 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -172,7 +172,7 @@ static void pred_spatial_direct_motion(H264Context * const h, int *mb_type){
     int mv[2];
     int list;
 
-    assert(h->ref_list[1][0].reference&3);
+    assert(h->ref_list[1][0].f.reference & 3);
 
     await_reference_mb_row(h, &h->ref_list[1][0], s->mb_y + !!IS_INTERLACED(*mb_type));
 
@@ -416,7 +416,7 @@ static void pred_temp_direct_motion(H264Context * const h, int *mb_type){
     unsigned int sub_mb_type;
     int i8, i4;
 
-    assert(h->ref_list[1][0].reference&3);
+    assert(h->ref_list[1][0].f.reference & 3);
 
     await_reference_mb_row(h, &h->ref_list[1][0], s->mb_y + !!IS_INTERLACED(*mb_type));
 
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 8d40492..6839186 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -225,7 +225,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
     int r;
 
     if (s->avctx->hwaccel) {
-        assert(!pic->hwaccel_picture_private);
+        assert(!pic->f.hwaccel_picture_private);
         if (s->avctx->hwaccel->priv_data_size) {
             pic->f.hwaccel_picture_private = av_mallocz(s->avctx->hwaccel->priv_data_size);
             if (!pic->f.hwaccel_picture_private) {
@@ -276,7 +276,7 @@ int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){
 
     if(shared){
         assert(pic->f.data[0]);
-        assert(pic->type == 0 || pic->type == FF_BUFFER_TYPE_SHARED);
+        assert(pic->f.type == 0 || pic->f.type == FF_BUFFER_TYPE_SHARED);
         pic->f.type = FF_BUFFER_TYPE_SHARED;
     }else{
         assert(!pic->f.data[0]);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 809ede1..cad267b 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1093,8 +1093,8 @@ static int select_input_picture(MpegEncContext *s){
                             s->input_picture[0]->f.data[i] = NULL;
                         s->input_picture[0]->f.type = 0;
                     }else{
-                        assert(   s->input_picture[0]->type==FF_BUFFER_TYPE_USER
-                               || s->input_picture[0]->type==FF_BUFFER_TYPE_INTERNAL);
+                        assert(   s->input_picture[0]->f.type == FF_BUFFER_TYPE_USER
+                               || s->input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL);
 
                         s->avctx->release_buffer(s->avctx, (AVFrame*)s->input_picture[0]);
                     }
@@ -1220,8 +1220,8 @@ no_output_pic:
         }else{
             // input is not a shared pix -> reuse buffer for current_pix
 
-            assert(   s->reordered_input_picture[0]->type==FF_BUFFER_TYPE_USER
-                   || s->reordered_input_picture[0]->type==FF_BUFFER_TYPE_INTERNAL);
+            assert(   s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_USER
+                   || s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL);
 
             s->current_picture_ptr= s->reordered_input_picture[0];
             for(i=0; i<4; i++){
@@ -2757,7 +2757,7 @@ static int estimate_qp(MpegEncContext *s, int dry_run){
 
 /* must be called before writing the header */
 static void set_frame_distances(MpegEncContext * s){
-    assert(s->current_picture_ptr->pts != AV_NOPTS_VALUE);
+    assert(s->current_picture_ptr->f.pts != AV_NOPTS_VALUE);
     s->time = s->current_picture_ptr->f.pts * s->avctx->time_base.num;
 
     if(s->pict_type==AV_PICTURE_TYPE_B){



More information about the ffmpeg-cvslog mailing list