summaryrefslogtreecommitdiffstats
path: root/mpvcore/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-23 21:41:40 +0100
committerwm4 <wm4@nowhere>2013-11-23 21:41:40 +0100
commitf90e7ef7eafa0d5b1933f93bb116011cf1cb74b1 (patch)
tree56bd6201e2bd2f0d54eadeb24c8b888703d87c77 /mpvcore/player/loadfile.c
parentde68b8f23c8cfbf5967aa73b08835f75ac0f152e (diff)
downloadmpv-f90e7ef7eafa0d5b1933f93bb116011cf1cb74b1.tar.bz2
mpv-f90e7ef7eafa0d5b1933f93bb116011cf1cb74b1.tar.xz
video: don't overwrite demuxer FPS value
If the --fps option was given (MPOpts->force_fps), the demuxer FPS value was overwritten with the forced value. This was fine, since the demuxer value wasn't needed anymore. But with the recent changes not to write to the demuxer stream headers, we don't want to do this anymore. So maintain the (forced/updated) FPS value in dec_video->fps. The removed code in loadfile.c is probably redundant, and an artifact from past refactorings. Note that sub.c will now always use the demuxer FPS value, instead of the user override value. I think this is fine, because it used the demuxer's video size values too. (And it's rare that these values are used at all.)
Diffstat (limited to 'mpvcore/player/loadfile.c')
-rw-r--r--mpvcore/player/loadfile.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mpvcore/player/loadfile.c b/mpvcore/player/loadfile.c
index 33ee770b08..83916e5612 100644
--- a/mpvcore/player/loadfile.c
+++ b/mpvcore/player/loadfile.c
@@ -691,9 +691,6 @@ bool mp_remove_track(struct MPContext *mpctx, struct track *track)
static void open_subtitles_from_options(struct MPContext *mpctx)
{
- // after reading video params we should load subtitles because
- // we know fps so now we can adjust subtitle time to ~6 seconds AST
- // check .sub
if (mpctx->opts->sub_name) {
for (int i = 0; mpctx->opts->sub_name[i] != NULL; ++i)
mp_add_subtitles(mpctx, mpctx->opts->sub_name[i]);
@@ -1180,13 +1177,6 @@ goto_reopen_demuxer: ;
reinit_audio_chain(mpctx);
reinit_subs(mpctx);
- //================ SETUP STREAMS ==========================
-
- if (opts->force_fps && mpctx->d_video) {
- mpctx->d_video->header->video->fps = opts->force_fps;
- MP_INFO(mpctx, "FPS forced to be %5.3f.\n", mpctx->d_video->header->video->fps);
- }
-
//==================== START PLAYING =======================
if (!mpctx->d_video && !mpctx->d_audio) {