comparison libmpdemux/demux_mov.c @ 36316:139f2b064ef9

Don't subsequently calculate original_aspect from last movie_aspect. Instead, differentiate between the original aspect ratio stored in or determined from the video file and the forced, i.e. current, aspect ratio (e.g. forced by command line override). This enables multiple independent instances of vd.c again which has been broken by introducing a static variable in r36401. Without the subsequent calculation of original_aspect it now contains nothing but the pure video file aspect ratio which makes it possible to use movie_aspect -1 to set the original aspect ratio which explains the changes in command.c and gui/dialog/menu.c. The changes in vd_mpegpes due to the impact of original_aspect will fix a bug there at the same time where the condition in order to call mpcodecs_config_vo() should only trigger once when the encoded aspect changes. So far, the forced, i.e. current, aspect has been checked. The whole is related to enabling special argument -1 to switch_ratio started in r36391.
author ib
date Wed, 07 Aug 2013 20:41:34 +0000
parents 425467b5be98
children 689594b793f7
comparison
equal deleted inserted replaced
36315:e4ab2ab9eede 36316:139f2b064ef9
1141 if(!sh->disp_w && !sh->disp_h) { 1141 if(!sh->disp_w && !sh->disp_h) {
1142 sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8); 1142 sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8);
1143 sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8); 1143 sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8);
1144 } else if(sh->disp_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){ 1144 } else if(sh->disp_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){
1145 // codec and display width differ... use display one for aspect 1145 // codec and display width differ... use display one for aspect
1146 sh->aspect=trak->tkdata[77]|(trak->tkdata[76]<<8); 1146 sh->original_aspect=trak->tkdata[77]|(trak->tkdata[76]<<8);
1147 sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8); 1147 sh->original_aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8);
1148 } 1148 }
1149 } 1149 }
1150 1150
1151 if(depth>32+8) mp_msg(MSGT_DEMUX, MSGL_INFO,"*** depth = 0x%X\n",depth); 1151 if(depth>32+8) mp_msg(MSGT_DEMUX, MSGL_INFO,"*** depth = 0x%X\n",depth);
1152 1152