| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When resizing the cache, the buffer for the DVD timestamps is
initialized with 0. This causes the player to always return playback
position 0 with any file format (not just DVD), and also makes all
relative seeks relative to position 0. Fix this by clearing the
timestamps explicitly.
Closes #899.
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently clearing on every map can cause problems with vdpau when
switching virtual desktops and such. This was observed with at least
XMonad and nvidia-340.17. It's not observed on some other setups without
XMonad.
It's not clear why this happens. Normally, the window background is not
saved, so clearing should have no additional affect. It's a complete
mystery. Possible, the use of legacy X drawing commands (used to clear
the window) interferes with vdpau operation in non-trivial ways.
Work this around by clearing on initial map only. This probably only
hides the underlying issue, but good enough.
Closes #897.
CC: @mpv-player/stable
|
|
|
|
|
|
|
| |
This also means that the printed size is always rounded to KBs, because
the cache properties are returned in KB. I think this doesn't matter
much. But if it does, the cache properties should probably changed to
return bytes in the first place.
|
|
|
|
| |
Then it's simply empty.
|
| |
|
|
|
|
|
|
|
| |
I'm pretty sure libavformat does this automatically, and we don't have
other demuxers where this could happen.
Still, slightly "risky" - so let's see.
|
|
|
|
| |
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Something like "char *s = ...; isdigit(s[0]);" triggers undefined
behavior, because char can be signed, and thus s[0] can be a negative
value. The is*() functions require unsigned char _or_ EOF. EOF is a
special value outside of unsigned char range, thus the argument to the
is*() functions can't be a char.
This undefined behavior can actually trigger crashes if the
implementation of these functions e.g. uses lookup tables, which are
then indexed with out-of-range values.
Replace all <ctype.h> uses with our own custom mp_is*() functions added
with misc/ctype.h. As a bonus, these functions are locale-independent.
(Although currently, we _require_ C locale for other reasons.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It was intended to be set to "weak" (and that was even documented), but
the actual setting was "no".
Closes #890.
CC: @mpv-player/stable
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some of these might be security relevant.
The RealAudio code was especially bad. I'm not sure if all RealAudio
stuff still plays correctly; I didn't have that many samples for
testing. Some checks might be unnecessary or overcomplicated compared
to the (obfuscated) nature of the code.
CC: @mpv-player/stable
|
| |
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
| |
This commit makes the playback start time always at time 0.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
This is actually needed for encoding only, and not decoding. Drop it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rgain is not an additive value. It's a multiplier/gain.
Previous behaviour produced negative level values in some cases
(when rgain < 1.0) which caused volume to be louder when its value
was lowered.
CC: @mpv-player/stable
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
| |
The string could get reallocated.
CC: @mpv-player/stable
|
|
|
|
| |
Also add some explanations how the config paths are determined.
|
|
|
|
|
|
| |
Also allows it to deal with NULL return values, which currently is not
needed, but may or may not be required at some point in the future (what
if malloc fails).
|
|
|
|
|
|
|
|
| |
Seems like a good idea, even if it's basically unused (yet).
Also document requirements on the functions (they're not obvious).
OSX changes untested.
|
|
|
|
|
| |
Requires less special-casing, and probably also avoids that starting mpv
with --no-config creates a config dir (even if nothing is loaded).
|
|
|
|
|
| |
IMO a semi-bad concept, that the mpv code unfortunately uses way too
much.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, the config functions added various allocations to the user-
provided talloc context. Make it so that they're all under the returned
allocation instead. This allows avoiding having to create an extra
temporary context for some callers, and also avoids adding random memory
leaks by accidentally passing a NULL context.
mp_find_all_config_files() has to be changed not to return a pointer
into the middle array for this to work. Make it add paths in order
(instead of reverse), and then reverse the array entries after that.
Also remove the declarations for the win-specific private functions.
Remove STRNULL(); it's barely needed anymore and the functions are
not called with NULL filenames anymore.
|
|
|
|
|
|
|
| |
This was dropped in the commit adding XDG support, probably
accidentally.
Also normalize some whitespace.
|
|
|
|
|
|
|
|
|
|
|
| |
This means normally the XDG config dir will be used. But if the old
config dir (~/.mpv) exists and the XDG config dir does not, then don't
create it.
To simplify the code, also make mp_path_exists() accept NULL paths. In
that case it's considered as not existing. (Funnily, on Linux this
already worked, because the string is passed directly to the kernel,
and the kernel will just return EFAULT on invalid memory.)
|
|
|
|
|
|
|
| |
It's better to keep the logic in one place.
Also drop that a broken config file aborts loading of the player. I
don't see much reason for this, and it inflates the code slightly.
|
|
|
|
|
|
|
|
|
|
| |
Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files.
This also negates the need to have separate user and global variants of
mp_find_config_file()
Closes #864, #109.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
Requested by a user. Closes #878.
|
| |
|
|
|
|
|
| |
Now it's at least actually relayed to the TV code. I didn't/couldn't
test whether it actually works, though.
|
|
|
|
| |
Oops.
|
|
|
|
|
|
| |
This is hopefully better for web streams.
Temporary workaround for #870.
|
| |
|
|
|
|
|
|
| |
Close #837
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
| |
These consult the vertical resolution, matching against 576 for
PAL and 480/486 for NTSC. The documentation has also been updated.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
| |
Notably, we now conform to SMPTE 428-1-2006 when decoding XYZ12 input,
and we can support rendering intents other than colorimetric when
converting between BT.709 and BT.2020, like with :srgb or :icc-profile.
|
|
|
|
|
|
|
|
|
| |
With this change, XYZ input is directly converted to the output
colorspace wherever possible, and to the colorspace specified by the
tags and/or --primaries option, otherwise.
This commit also restructures some of the CMS code in gl_video.c to
hopefully make it clearer which decision is being done where and why.
|
|
|
|
|
|
|
|
|
| |
This also avoids an extra matrix multiplication when using :srgb, making
that path both more efficient and also eliminating more hard-coded
values.
In addition, the previously hard-coded XYZ to RGB matrix will be
dynamically generated.
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
| |
This add support for reading primary information from lavc, categorized
into BT.601-525, BT.601-625, BT.709 and BT.2020; and passes it on to the
vo. In vo_opengl, we always generate the 3dlut against the wider BT.2020
and transform our source into this colorspace in the shader.
|
|
|
|
| |
Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
|
| |
|
|
|
|
|
|
|
|
|
| |
For remarks, pretty much see the manpage additions. Could help with
network streams that require too much seeking (maybe), or might be
extended to help with the use case of watching and downloading a file
at the same time.
In general, it might be a useless feature and could be removed again.
|
|
|
|
|
| |
Remove unused stream type constants. Move some now DVD specific crap
to stream_dvd.c.
|
|
|
|
|
| |
One message pointed to a removed file, so just get rid of the messages.
They were helpful in the earlier 2000s, but now they're just confusing.
|
|
|
|
|
| |
This additional sub-directory doesn't serve any purpose anymore. Get rid
of it.
|
| |
|
|
|
|
| |
I wish I could make github run a hook to reject these.
|
|
|
|
|
|
| |
It seems it's generally cleaner to leave this stuff to the BSDs.
Additionally, the NetBSD part wasn't even correct, because it made the
compiler prefer the system include path before local include files.
|
|
|
|
| |
The old stream_dvd.c implementation is still available under dvdread://.
|
|
|
|
|
| |
Attempt to fix a reported freeze with some DVDs. Unknown if this helps,
and it still might read the whole DVD before terminating.
|
|
|
|
|
|
|
|
| |
It is reasonably stable, so all further changes will be versioned.
Also change how the libmpv version number is generated. Fix the patch
version number to 0; I don't think we have a use for this. In
particular, the version doesn't version mpv, just the client API.
|
| |
|
|
|
|
| |
Recent regression.
|
| |
|
|
|
|
|
|
| |
Reallocating an array while you still have pointers to it -> bad idea.
Recent regression.
|
|
|
|
|
|
| |
Do this simply by clearing the mapped buffer on every draw_image() call
without an actual video frame. (Maybe this is a bit expensive, but at
least not more expensive than regular video display.)
|
|
|
|
|
|
| |
Clear the texture on reconfig(). (We could probably also do this simpler
with a flag, but this is actually less complicated - except that we move
the code to "map" a texture to a separate function.)
|
|
|
|
|
|
| |
With the change to merge osd drawing into video frame drawing, some
bogus logic got in: they skipped drawing the OSD if no video frame is
available. This broke --no-video --force-window mode.
|
|
|
|
|
| |
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
| |
In the pbo case, mpi was reassigned to a stack pointer, and later
deallocated. Just change the code so it doesn't need to be reassigned.
|
|
|
|
| |
Made the first line formatted differently.
|
| |
|
|
|
|
| |
At least 1 person expected that this works this way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, bitmap subtitles were decoded at "some" point, and then
simply replaced the old subtitle. Although the subtitle is selected
by time (PTS), it could happen that a subtitle was replaced too early.
One consequence is that this might lead to flicker even if the
subtitles are timed to follow each other without a gap (although most
subtitles are explicitly timed to introduce such a gap). With this
commit the past 4 subtitles are kept (instead of 1), so that the
correct one can be picked by time. This should fix the aforementioned
cases, but more importantly will allow demuxing/decoding and video
display to be somewhat asynchronous.
Still missing: somehow making sure the correct range of decoded
subtitles is available, instead of just passing along whatever comes
from the demuxer, and hoping that 4 queued subtitles are enough. But it
should certainly be good enough for now.
This removes a check that resets the subtitles if the PTS is 5 minutes
before the end of the current subtitle; this is probably not needed.
|
|
|
|
|
| |
The type is struct mp_image_params, so the "params" should have a "s".
"equals" shouldn't, because it's plural for 2 params. Important.
|
|
|
|
| |
mp_image_params_from_image() is now trivial and can be removed.
|
|
|
|
| |
Separate to not confuse git history tracking.
|
|
|
|
|
| |
I wonder if this is better. The intention is to make the instructions
for sending patches more visible.
|