changeset 9690:cc0380d2bbc3 libavcodec

Set progressive_sequence before MPV_common_init which cares about it when setting mb_height for interlaced mpeg-2 encoding.
author bcoudurier
date Sat, 23 May 2009 01:22:43 +0000
parents 61b77bb5414a
children 9447a746f2cb
files mpegvideo_enc.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_enc.c	Sat May 23 01:20:42 2009 +0000
+++ b/mpegvideo_enc.c	Sat May 23 01:22:43 2009 +0000
@@ -649,6 +649,9 @@
 
     s->encoding = 1;
 
+    s->progressive_frame=
+    s->progressive_sequence= !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN));
+
     /* init */
     if (MPV_common_init(s) < 0)
         return -1;
@@ -663,8 +666,7 @@
 
     if((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant)
         s->chroma_qscale_table= ff_h263_chroma_qscale_table;
-    s->progressive_frame=
-    s->progressive_sequence= !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN));
+
     s->quant_precision=5;
 
     ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp);