1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 20:27:23 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
wm4
939d34e8f1 Config path functions can return NULL
It's quite unlikely, but functions like mp_find_user_config_file() can
return NULL, e.g. if $HOME is unset.

Fix all the code that didn't check for this correctly yet.
2013-09-20 21:21:23 +02:00
wm4
bb2238516b path: fix undefined behavior
The homepath variable was static, and its value was set to a stack
buffer. This means a second invocation of the function would trigger
undefined behavior. Moreover the stack buffer always went out of scope
before homepath was used.
2013-09-20 21:20:58 +02:00
wm4
ab816f1ab1 mplayer: read subtitle packets as soon as possible
Call update_subtitles() on every iteration of the playloop, so that
subtitle packets are read as soon as possible, instead of every time a
video frame is displayed. This helps in case the packet queue is swamped
with subtitle packets, which can happen with certain insane mkv files.
The change will simply cause the subtitle queue to be emptied on each
playloop iteration.

The timestamps update_subtitles() uses for display are the same before
and after this commit. (Important for files which have subtitle packets
with timestamps or duration not set.)
2013-09-20 21:20:36 +02:00
wm4
11602fd31a mplayer: print a message when writing watch_later config for resume
Putting this into stable, because it might help debugging certain
issues, and also making the user aware what's happening.
2013-09-20 21:18:32 +02:00
Stefano Pigozzi
0f1a871d65 macosx: always active bundle path lookup if cocoa is active
This is not really something you want to disable anyway. If there is no bundle
the code already does it's falbacks anyway.
2013-09-13 22:04:47 +02:00
Martin Herkt
c472782c3e mpvcore/path: Fix non-MinGW builds
Well that was dumb.
2013-09-13 22:04:47 +02:00
Martin Herkt
601c285d83 mpvcore/path: Fix config path handling on Windows
Previously, mpv incorrectly used the %HOME% environment variable on
MinGW to determine the current user’s home directory. This is wrong;
the correct variable to use would be %HOMEPATH%, which would however
still be wrong since application data goes into the application data
directory, not the user’s home. This patch makes it use the local
AppData path instead of reading an environment variable.

This however exposed another problem (which also affected users who
actually had the %HOME% variable set):
b2c2fe7a37 (discussed in issue #95) introduced some changes that
make mpv load user config files from the executable path on Windows.
The problem with this change is that config_dir was still declared
static, so once a config file had been found in the executable path,
it would set config_dir to an empty string, so mpv would dump e.g.
watch_later data straight into the user’s home. This commit also
fixes that.

One side effect of this is that mpv no longer considers the “mpv”
subdirectory in the executable path (that behavior resulted from
the homedir variable always being empty), unless it is somehow
unable to determine the local AppData path.
2013-09-13 22:04:47 +02:00
wm4
73e4094770 options: fix --volume option range, add some explanations to manpage
The --volume option accepted values up to 10000, but internally, the
value is always clipped to 0-100 range. What makes this even worse is
that --softvol-max suggests that it extends the range of --volume, which
is not the case. (And passing a volume larger than 100 to --volume
didn't even print a warning.)
2013-09-07 08:54:28 +02:00
wm4
93bf6eba3b mplayer: try to resume playback only if a resume file actually exists
Well, this was dumb. The resume message was printed for every file,
whether a resume config file existed or not.
2013-09-07 08:51:36 +02:00
wm4
74be07c36d mplayer: handle --reset-on-next-file=""
The option list contains an empty string member with this option value,
so ignore that. I'm not sure whether the option list should maybe be
empty in this case, but it could be the wrong thing in case of other
options.
2013-09-04 01:42:49 +02:00
wm4
54c371a293 mplayer: don't let playback resume force options that are file local
This happens by default with pausing: if a file was paused when doing
quit_watch_later, then resume and unpause, then the file played after
that would start in paused mode. This is because the pause option is
backed up at thr wrong place, so it backs up the state from resuming,
instead of whatever it was set to before that.
2013-09-04 01:42:46 +02:00
wm4
c47bf17c0f input: fix --no-input-default-bindings
The option did nothing. This was probably broken with 5b38a52.
2013-08-29 19:20:17 +02:00
wm4
d3f7248ca9 m_option: make "add speed 0.1" command work
Was broken since the speed property was switched from float to double.
2013-08-19 22:33:39 +02:00
wm4
cf880b9070 mplayer: don't make restored options from quit_watch_later per-file local
Consider:

    mpv file1.mkv file2.mkv

and file1.mkv is restored from an earlier session when quit_watch_later
was used. Then all restored options were reset when file2.mkv is played,
even if the user changed them during playback. This affects for example
the fullscreen setting.

Make it so that after finishing a resumed file, the previously restored
settings are not reset again. (Which means only resuming will forcefully
overwrite the settings.)
2013-08-18 05:58:28 +02:00
wm4
abe47a4840 core: make sure hw decoding works when playing multiple files
The hw decoding context was set only for the first file (when the VO was
initialized), instead of every file.
2013-08-11 20:08:00 +02:00
Alexander Preisinger
023e5ccd02 input: add support for precise scroll axes
Support horizontal and vertical axes of input devices.

If the input device support precise scrolling with an input value then it
should first be scaled to a standard multiplier, where 1.0 is the default.

The multiplier will then applied to the following commands if possible:
 * MP_CMD_SEEK
 * MP_CMD_SPEED_MULT
 * MP_CMD_ADD

All other commands will triggered on every axis event, without change the
values specified in the config file.
2013-08-07 22:15:39 +02:00
Stefano Pigozzi
406241005e core: move contents to mpvcore (2/2)
Followup commit. Fixes all the files references.
2013-08-06 22:52:31 +02:00
Stefano Pigozzi
bc27f946c2 core: move contents to mpvcore (1/2)
core is used in many unix systems for core dumps. For that reason some tools
work under the assumption that the file is indeed a core dump (for example
autoconf does this).

This commit just renames the files. The following one will change all the
includes to fix compilation. This is done this way because git has a easier
time tracing file changes if there is a pure rename commit.
2013-08-06 22:48:47 +02:00