Mercurial > libavcodec.hg
diff h261.c @ 2266:514949de5d15 libavcodec
set AVCodecContext.width/height to the picture width/height instead of the one stored in the bitstream (that only matters if lowres!=0)
author | michael |
---|---|
date | Mon, 27 Sep 2004 02:39:55 +0000 |
parents | 35fc37209ea0 |
children | 21f450be6cb5 |
line wrap: on
line diff
--- a/h261.c Sun Sep 26 23:01:42 2004 +0000 +++ b/h261.c Mon Sep 27 02:39:55 2004 +0000 @@ -118,8 +118,8 @@ MPV_decode_defaults(s); s->avctx = avctx; - s->width = s->avctx->width; - s->height = s->avctx->height; + s->width = s->avctx->width >> avctx->lowres; + s->height = s->avctx->height >> avctx->lowres; s->codec_id = s->avctx->codec->id; s->out_format = FMT_H261; @@ -715,15 +715,15 @@ return -1; } - if (s->width != avctx->width || s->height != avctx->height){ + if (s->width >> avctx->lowres != avctx->width || s->height >> avctx->lowres != avctx->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->height = s->height; + avctx->width = s->width >> avctx->lowres; + avctx->height = s->height >> avctx->lowres; goto retry; }