changeset 1732:f716b8f47d98 libavcodec

uninitalized variables fix by (Gildas Bazin <gbazin at altern dot org>) and some related cleanup by me
author michael
date Thu, 08 Jan 2004 18:44:36 +0000
parents c3579468d42c
children b47d56b1a049
files mpeg12.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Thu Jan 08 18:24:35 2004 +0000
+++ b/mpeg12.c	Thu Jan 08 18:44:36 2004 +0000
@@ -1737,6 +1737,7 @@
 {
     Mpeg1Context *s = avctx->priv_data;
     
+    s->mpeg_enc_ctx.avctx= avctx;
     s->mpeg_enc_ctx.flags= avctx->flags;
     common_init(&s->mpeg_enc_ctx);
     init_vlcs();
@@ -2372,7 +2373,6 @@
         s->width = width;
         s->height = height;
         avctx->has_b_frames= 1;
-        s->avctx = avctx;
         avctx->width = width;
         avctx->height = height;
         av_reduce(
@@ -2474,7 +2474,6 @@
     s->height = avctx->height;
     avctx->has_b_frames= 0; //true?
     s->low_delay= 1;
-    s->avctx = avctx;
 
     //get_format() or set_video(width,height,aspect,pix_fmt);
     //until then pix_fmt may be changed right after codec init