comparison libmpdemux/demux_lavf.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 7b135b3b8b38
children 996d93a5ed1f
comparison
equal deleted inserted replaced
36315:e4ab2ab9eede 36316:139f2b064ef9
392 } 392 }
393 sh_video->fps=av_q2d(st->r_frame_rate); 393 sh_video->fps=av_q2d(st->r_frame_rate);
394 sh_video->frametime=1/av_q2d(st->r_frame_rate); 394 sh_video->frametime=1/av_q2d(st->r_frame_rate);
395 sh_video->format=bih->biCompression; 395 sh_video->format=bih->biCompression;
396 if(st->sample_aspect_ratio.num) 396 if(st->sample_aspect_ratio.num)
397 sh_video->aspect = codec->width * st->sample_aspect_ratio.num 397 sh_video->original_aspect = codec->width * st->sample_aspect_ratio.num
398 / (float)(codec->height * st->sample_aspect_ratio.den); 398 / (float)(codec->height * st->sample_aspect_ratio.den);
399 else 399 else
400 sh_video->aspect=codec->width * codec->sample_aspect_ratio.num 400 sh_video->original_aspect = codec->width * codec->sample_aspect_ratio.num
401 / (float)(codec->height * codec->sample_aspect_ratio.den); 401 / (float)(codec->height * codec->sample_aspect_ratio.den);
402 sh_video->i_bps=codec->bit_rate/8; 402 sh_video->i_bps=codec->bit_rate/8;
403 if (title && title->value) 403 if (title && title->value)
404 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value); 404 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value);
405 if (rot && rot->value) 405 if (rot && rot->value)