From 9fe2fa599b0a8e9e1468b53ed025b76b55639af5 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 25 Aug 2011 02:45:13 +0300 Subject: 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). --- mplayer.c | 9 ++------- 1 file 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; } } -- cgit v1.2.3