diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-27 11:50:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-27 11:50:56 +0000 |
commit | 21adafec2a42d5575ff0a36a028849a9b886c055 (patch) | |
tree | 08fa557bfc0d7b64f2974636330ddeb9da65b416 /libavcodec/mpeg12.c | |
parent | 0b2346d38c96cbc218cb75e8f83eec788cd1bc29 (diff) | |
download | ffmpeg-21adafec2a42d5575ff0a36a028849a9b886c055.tar.gz |
lowres width/height cleanup 3rd try
Originally committed as revision 3522 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 82a1a80fb5..5a83698efa 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1966,8 +1966,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ if ( (s1->mpeg_enc_ctx_allocated == 0)|| - avctx->width != -((-s->width )>>avctx->lowres) || - avctx->height != -((-s->height)>>avctx->lowres) || + avctx->coded_width != s->width || + avctx->coded_height != s->height|| // s1->save_aspect_info != avctx->aspect_ratio_info|| 0) { @@ -1979,8 +1979,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ if( (s->width == 0 )||(s->height == 0)) return -2; - avctx->width = -((-s->width )>>avctx->lowres); - avctx->height = -((-s->height)>>avctx->lowres); + avcodec_set_dimensions(avctx, s->width, s->height); avctx->bit_rate = s->bit_rate; s1->save_aspect_info = s->aspect_ratio_info; @@ -2776,8 +2775,8 @@ static int vcr2_init_sequence(AVCodecContext *avctx) if (s1->mpeg_enc_ctx_allocated) { MPV_common_end(s); } - s->width = avctx->width; - s->height = avctx->height; + s->width = avctx->coded_width; + s->height = avctx->coded_height; avctx->has_b_frames= 0; //true? s->low_delay= 1; |