diff mpeg12.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 bd09f4d1976f
children 21f450be6cb5
line wrap: on
line diff
--- a/mpeg12.c	Sun Sep 26 23:01:42 2004 +0000
+++ b/mpeg12.c	Mon Sep 27 02:39:55 2004 +0000
@@ -1966,8 +1966,8 @@
 
     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 @@
 	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;