mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults()
authorAnton Khirnov <anton@khirnov.net>
Sat, 30 Nov 2013 09:50:20 +0000 (10:50 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 5 Dec 2013 12:22:55 +0000 (13:22 +0100)
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c

index b11484e..74095af 100644 (file)
@@ -788,9 +788,6 @@ void ff_MPV_common_defaults(MpegEncContext *s)
 
     s->coded_picture_number  = 0;
     s->picture_number        = 0;
-    s->input_picture_number  = 0;
-
-    s->picture_in_gop_number = 0;
 
     s->f_code                = 1;
     s->b_code                = 1;
index 414be90..bacec72 100644 (file)
@@ -217,6 +217,9 @@ static void MPV_encode_defaults(MpegEncContext *s)
     }
     s->me.mv_penalty = default_mv_penalty;
     s->fcode_tab     = default_fcode_tab;
+
+    s->input_picture_number  = 0;
+    s->picture_in_gop_number = 0;
 }
 
 /* init video encoder */