diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-27 02:39:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-27 02:39:55 +0000 |
commit | 4f8a831994889f2a90669dc230c14d203d52083d (patch) | |
tree | bda1bf3ac88ece871b88a36ff6a4d95eb4ef81a3 /libavcodec/mpeg12.c | |
parent | 718455951c74269a95117b117a2790c4edeef979 (diff) | |
download | ffmpeg-4f8a831994889f2a90669dc230c14d203d52083d.tar.gz |
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/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 550f17d154..82a1a80fb5 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->height != s->height|| + avctx->width != -((-s->width )>>avctx->lowres) || + avctx->height != -((-s->height)>>avctx->lowres) || // s1->save_aspect_info != avctx->aspect_ratio_info|| 0) { @@ -1979,8 +1979,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ if( (s->width == 0 )||(s->height == 0)) return -2; - avctx->width = s->width; - avctx->height = s->height; + avctx->width = -((-s->width )>>avctx->lowres); + avctx->height = -((-s->height)>>avctx->lowres); avctx->bit_rate = s->bit_rate; s1->save_aspect_info = s->aspect_ratio_info; |