comparison mpeg12.c @ 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 73a3699b8375
children 07a484280a82
comparison
equal deleted inserted replaced
1731:c3579468d42c 1732:f716b8f47d98
1735 1735
1736 static int mpeg_decode_init(AVCodecContext *avctx) 1736 static int mpeg_decode_init(AVCodecContext *avctx)
1737 { 1737 {
1738 Mpeg1Context *s = avctx->priv_data; 1738 Mpeg1Context *s = avctx->priv_data;
1739 1739
1740 s->mpeg_enc_ctx.avctx= avctx;
1740 s->mpeg_enc_ctx.flags= avctx->flags; 1741 s->mpeg_enc_ctx.flags= avctx->flags;
1741 common_init(&s->mpeg_enc_ctx); 1742 common_init(&s->mpeg_enc_ctx);
1742 init_vlcs(); 1743 init_vlcs();
1743 1744
1744 s->mpeg_enc_ctx_allocated = 0; 1745 s->mpeg_enc_ctx_allocated = 0;
2370 MPV_common_end(s); 2371 MPV_common_end(s);
2371 } 2372 }
2372 s->width = width; 2373 s->width = width;
2373 s->height = height; 2374 s->height = height;
2374 avctx->has_b_frames= 1; 2375 avctx->has_b_frames= 1;
2375 s->avctx = avctx;
2376 avctx->width = width; 2376 avctx->width = width;
2377 avctx->height = height; 2377 avctx->height = height;
2378 av_reduce( 2378 av_reduce(
2379 &avctx->frame_rate, 2379 &avctx->frame_rate,
2380 &avctx->frame_rate_base, 2380 &avctx->frame_rate_base,
2472 } 2472 }
2473 s->width = avctx->width; 2473 s->width = avctx->width;
2474 s->height = avctx->height; 2474 s->height = avctx->height;
2475 avctx->has_b_frames= 0; //true? 2475 avctx->has_b_frames= 0; //true?
2476 s->low_delay= 1; 2476 s->low_delay= 1;
2477 s->avctx = avctx;
2478 2477
2479 //get_format() or set_video(width,height,aspect,pix_fmt); 2478 //get_format() or set_video(width,height,aspect,pix_fmt);
2480 //until then pix_fmt may be changed right after codec init 2479 //until then pix_fmt may be changed right after codec init
2481 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT ) 2480 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT )
2482 if( avctx->idct_algo == FF_IDCT_AUTO ) 2481 if( avctx->idct_algo == FF_IDCT_AUTO )