summaryrefslogtreecommitdiff
path: root/libavcodec/h261.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-27 02:39:55 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-27 02:39:55 +0000
commit4f8a831994889f2a90669dc230c14d203d52083d (patch)
treebda1bf3ac88ece871b88a36ff6a4d95eb4ef81a3 /libavcodec/h261.c
parent718455951c74269a95117b117a2790c4edeef979 (diff)
set AVCodecContext.width/height to the picture width/height instead of the one stored in the bitstream (that only matters if lowres!=0)
Originally committed as revision 3518 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h261.c')
-rw-r--r--libavcodec/h261.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h261.c b/libavcodec/h261.c
index b9947d0f14..88bd755392 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;
- 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 @@ retry:
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;
}