mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext
authorAnton Khirnov <anton@khirnov.net>
Tue, 26 Nov 2013 13:34:52 +0000 (14:34 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 29 Nov 2013 16:35:13 +0000 (17:35 +0100)
libavcodec/mpeg4video.h
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.h

index 60857cc..6a143e1 100644 (file)
@@ -73,6 +73,8 @@ typedef struct Mpeg4DecContext {
     ///< time distance of first I -> B, used for interlaced b frames
     int t_frame;
 
+    int new_pred;
+
     /* bug workarounds */
     int divx_version;
     int divx_build;
index e2ad794..b1bcd38 100644 (file)
@@ -1940,8 +1940,8 @@ no_cplx_est:
             ctx->rvlc = get_bits1(gb);
 
         if (vo_ver_id != 1) {
-            s->new_pred = get_bits1(gb);
-            if (s->new_pred) {
+            ctx->new_pred = get_bits1(gb);
+            if (ctx->new_pred) {
                 av_log(s->avctx, AV_LOG_ERROR, "new pred not supported\n");
                 skip_bits(gb, 2); /* requested upstream message type */
                 skip_bits1(gb);   /* newpred segment type */
@@ -1950,7 +1950,7 @@ no_cplx_est:
                 av_log(s->avctx, AV_LOG_ERROR,
                        "reduced resolution VOP not supported\n");
         } else {
-            s->new_pred        = 0;
+            ctx->new_pred = 0;
         }
 
         s->scalability = get_bits1(gb);
index 3d4e26d..8dbded9 100644 (file)
@@ -592,7 +592,6 @@ typedef struct MpegEncContext {
     int scalability;
     int hierachy_type;
     int enhancement_type;
-    int new_pred;
     int aspect_ratio_info; //FIXME remove
     int sprite_warping_accuracy;
     int data_partitioning;           ///< data partitioning flag from header