Browse code

mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext

Anton Khirnov authored on 2013/11/26 22:34:52
Showing 3 changed files
... ...
@@ -73,6 +73,8 @@ typedef struct Mpeg4DecContext {
73 73
     ///< time distance of first I -> B, used for interlaced b frames
74 74
     int t_frame;
75 75
 
76
+    int new_pred;
77
+
76 78
     /* bug workarounds */
77 79
     int divx_version;
78 80
     int divx_build;
... ...
@@ -1940,8 +1940,8 @@ no_cplx_est:
1940 1940
             ctx->rvlc = get_bits1(gb);
1941 1941
 
1942 1942
         if (vo_ver_id != 1) {
1943
-            s->new_pred = get_bits1(gb);
1944
-            if (s->new_pred) {
1943
+            ctx->new_pred = get_bits1(gb);
1944
+            if (ctx->new_pred) {
1945 1945
                 av_log(s->avctx, AV_LOG_ERROR, "new pred not supported\n");
1946 1946
                 skip_bits(gb, 2); /* requested upstream message type */
1947 1947
                 skip_bits1(gb);   /* newpred segment type */
... ...
@@ -1950,7 +1950,7 @@ no_cplx_est:
1950 1950
                 av_log(s->avctx, AV_LOG_ERROR,
1951 1951
                        "reduced resolution VOP not supported\n");
1952 1952
         } else {
1953
-            s->new_pred        = 0;
1953
+            ctx->new_pred = 0;
1954 1954
         }
1955 1955
 
1956 1956
         s->scalability = get_bits1(gb);
... ...
@@ -592,7 +592,6 @@ typedef struct MpegEncContext {
592 592
     int scalability;
593 593
     int hierachy_type;
594 594
     int enhancement_type;
595
-    int new_pred;
596 595
     int aspect_ratio_info; //FIXME remove
597 596
     int sprite_warping_accuracy;
598 597
     int data_partitioning;           ///< data partitioning flag from header