From 21adafec2a42d5575ff0a36a028849a9b886c055 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Sep 2004 11:50:56 +0000 Subject: lowres width/height cleanup 3rd try Originally committed as revision 3522 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h261.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libavcodec/h261.c') diff --git a/libavcodec/h261.c b/libavcodec/h261.c index 88bd755392..909af75df2 100644 --- a/libavcodec/h261.c +++ b/libavcodec/h261.c @@ -118,8 +118,8 @@ static int h261_decode_init(AVCodecContext *avctx){ MPV_decode_defaults(s); s->avctx = avctx; - s->width = s->avctx->width >> avctx->lowres; - s->height = s->avctx->height >> avctx->lowres; + s->width = s->avctx->coded_width; + s->height = s->avctx->coded_height; s->codec_id = s->avctx->codec->id; s->out_format = FMT_H261; @@ -715,15 +715,14 @@ retry: return -1; } - if (s->width >> avctx->lowres != avctx->width || s->height >> avctx->lowres != avctx->height){ + if (s->width != avctx->coded_width || s->height != avctx->coded_height){ ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat s->parse_context.buffer=0; MPV_common_end(s); s->parse_context= pc; } if (!s->context_initialized) { - avctx->width = s->width >> avctx->lowres; - avctx->height = s->height >> avctx->lowres; + avcodec_set_dimensions(avctx, s->width, s->height); goto retry; } -- cgit v1.2.3