summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-08-25 02:45:13 +0300
committerUoti Urpala <uau@mplayer2.org>2011-08-25 02:45:13 +0300
commit9fe2fa599b0a8e9e1468b53ed025b76b55639af5 (patch)
treed3378ed0cd3a48d68428f6ec1f2dee01f9a9ade6
parent8cc5ba5ab8a045a3e3ffaa8a040d815148caa6c9 (diff)
downloadmpv-9fe2fa599b0a8e9e1468b53ed025b76b55639af5.tar.bz2
mpv-9fe2fa599b0a8e9e1468b53ed025b76b55639af5.tar.xz
core: remove bad workaround for files without FPS set
Commit dde8b753e4 merged an mplayer1 change (r31328) that set correct_pts to true if FPS was not set (on the assumption that correct-pts mode could provide proper timing without FPS). As the merge commit noted this change was somewhat questionable, as the option shouldn't really change after things have already been initialized. After recent changes it can cause an outright crash (assert in ds_get_packet2() from 9c7c4e5b7d fails). Remove the hack. Also only print a warning about not having FPS if correct_pts is not set (in correct_pts mode not having FPS shouldn't be a real problem, as everything is based on timestamps anyway).
-rw-r--r--mplayer.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mplayer.c b/mplayer.c
index e853103bb9..55d81627bb 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -4777,7 +4777,6 @@ goto_enable_cache:
mpctx->sh_video = mpctx->d_video->sh;
if (mpctx->sh_video) {
-
current_module = "video_read_properties";
if (!video_read_properties(mpctx->sh_video)) {
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Video: Cannot read properties.\n");
@@ -4787,20 +4786,16 @@ goto_enable_cache:
"size:%dx%d fps:%5.3f ftime:=%6.4f\n",
mpctx->demuxer->file_format, mpctx->sh_video->format,
mpctx->sh_video->disp_w, mpctx->sh_video->disp_h,
- mpctx->sh_video->fps, mpctx->sh_video->frametime
- );
-
- /* need to set fps here for output encoders to pick it up in their init */
+ mpctx->sh_video->fps, mpctx->sh_video->frametime);
if (force_fps) {
mpctx->sh_video->fps = force_fps;
mpctx->sh_video->frametime = 1.0f / mpctx->sh_video->fps;
}
vo_fps = mpctx->sh_video->fps;
- if (!mpctx->sh_video->fps && !force_fps) {
+ if (!mpctx->sh_video->fps && !force_fps && !opts->correct_pts) {
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "FPS not specified in the "
"header or invalid, use the -fps option.\n");
- mpctx->opts.correct_pts = 1;
}
}