diff libmpdemux/demux_mov.c @ 5628:e1179cdffbf5

get aspect info from display size if != real size
author arpi
date Mon, 15 Apr 2002 01:58:18 +0000
parents ee9dd55ef383
children dfc219577da6
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Mon Apr 15 01:50:00 2002 +0000
+++ b/libmpdemux/demux_mov.c	Mon Apr 15 01:58:18 2002 +0000
@@ -885,8 +885,12 @@
 		if(!sh->disp_w && !sh->disp_h) {
 		  sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8);
 		  sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8);
-		}  
-
+		} else if(sh->disp_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){
+		  // codec and display width differ... use display one for aspect
+		  sh->aspect=trak->tkdata[77]|(trak->tkdata[76]<<8);
+		  sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8);
+		}
+		
 		if(depth&(~15)) printf("*** depht = 0x%X\n",depth);
 
 		// palettized?