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

37145 Commits

Author SHA1 Message Date
wm4
df0ec55499 build: update waf
<lachs0r> it fixes issues with recent python3
2014-03-11 00:19:43 +01:00
wm4
542bcdfc9d command: fix null pointer dereference in idle mode
Pressing 'h' in idle mode -> crash.
2014-03-11 00:19:26 +01:00
Andrey Morozov
218667b5a2 vdpau: change the error message when video too large 2014-03-11 00:16:46 +01:00
wm4
13a0e34aec example.conf: change subtitle codepage example to use UTF-8 fallback
This should be pretty safe compared to forcing the codepage.
2014-03-11 00:16:20 +01:00
Yaser Alraddadi
76b7a1a713 example.conf: subtitle encoding
Signed-off-by: wm4 <wm4@nowhere>

Closes #580.
2014-03-11 00:16:18 +01:00
wm4
6d6eee2e70 manpage: fix yadif example in one case 2014-03-11 00:15:53 +01:00
wm4
89f20cd2f3 input: check for abort cmd in multi-commands
MP_CMD_COMMAND_LIST commands (used to implement key bindings with
multiple commands) were not checked for abort commands. Implement it.

Remove the remarks about multi-commands being special from the manpage.
Seek coalescing is handled differently now, and the issue with abort
commands is fixed with this commit.
2014-03-11 00:14:30 +01:00
James Ross-Gowan
cce2b675ac input: ignore modifiers when releasing keys
This prevents keys from getting stuck if the modifier is released before
the base key.
2014-03-11 00:14:22 +01:00
wm4
c1ed4dc242 video: add rounding to aspect ratio calculations
Small errors are unavoidable, but truncation can cause anamorphic video
to be off by 1 or 2 pixels.
2014-03-11 00:13:57 +01:00
wm4
712657a894 player: fix start time if timeline is used (ordered chapters, EDL)
When timeline was used, and the --start option was not used, the initial
seek (needed to switch to the first timeline segment) seeked to -1 due
to an oversight.

Conflicts:
	player/loadfile.c
2014-03-11 00:13:39 +01:00
wm4
496956de3d edl: fix offset of user-visible chapters
Basically, chapter marks and chapter seek-points were incorrect, while
the rest worked.
2014-03-11 00:12:25 +01:00
James Ross-Gowan
483e703793 w32_common: don't set small icon
Windows will automatically choose the correct icon size if this field is
unset.
2014-03-11 00:12:00 +01:00
elevengu
717cdeb95d win32: restore support for exe directory as config directory
Same rationale as b2c2fe7a but updated to work with path-win.c

Signed-off-by: wm4 <wm4@nowhere>

Merges/closes #543.
2014-03-11 00:10:20 +01:00
wm4
315f3a9218 crosscompile-mingw: improve instructions for MXE 2014-03-11 00:10:17 +01:00
xylosper
d857722618 sd_lavc: handle subtitles with no subtitle resolution set
Set subtitle resolution to video resolution when avctx->width and
avctx->height are zero.

This can happen with broken vobsubs that have no size set in their
.idx file (or Matroska extradata). At least with the test file provided
in issue #551, using the video resolution as fallback instead of what
guess_resolution() does is better.

Note that these files clearly are broken. It seems this particular
file was created by trying to use ffmpeg to transcode DVB subtitles
to vobsub, and ffmpeg "forgot" to set the subtitle resolution in the
destination file. On the other hand, ffmpeg DVB and PGS decoders set
the resolution on the first subtitle packet (or somewhere close), so
it's not really clear what to do here.

Closes #551.

Signed-off-by: wm4 <wm4@nowhere>

Patch by xylosper, rewritten commit message by wm4.
2014-03-11 00:09:52 +01:00
Diogo Franco (Kovensky)
6d9d597b10 Parse::Matroska::Reader: get rid of bigrat
It seems that it was causing issues with certain perl setups (such as
the one on issue #549). It also turns out that it was not behaving correctly
(not all constants were being promoted to big nums as they should), so we
use explicit objects to derive the constants.

There were also precedence issues. I wonder if this even worked right to
begin with.

The 'double' path (8-byte floats) is untested, as I couldn't easily find
a file with such a field.

Closes #549.
2014-03-11 00:08:57 +01:00
Diogo Franco (Kovensky)
c4d905b567 build: Add -U__STRICT_ANSI__ to CFLAGS on Cygwin
Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros,
including _GNU_SOURCE; as a result, a lot of functions and defines get
masked out -- important defines such as M_PI and strcasecmp. Work around
it by undefining __STRICT_ANSI__ on cygwin systems.

This will still cause compilation issues on any non-cygwin system that
uses newlib, but hopefully nobody does that, or if they do, they will
find this commit message and know to add -U__STRICT_ANSI__ to their
CFLAGS. Hopefully.
2014-03-11 00:08:53 +01:00
wm4
e4c69376fc sub: handle vobsub-in-mp4
The mplayer decoder (spudec.c) actually handled this. There was explicit
code for binary palettes (16 32 bit values), and the subtitle resolution
was handled by video resolution coincidentally matching the subtitle
resolution.

Whoever puts vobsub into mp4 should be punished.

Fixes the sample gundam_sample.mp4, closes github issue #547.
2014-03-11 00:08:29 +01:00
wm4
842689bbf6 sd_lavc: use mp_lavc_set_extradata()
This includes the magical input padding required by libavcodec, which we
possibly didn't do before this commit.
2014-03-11 00:07:57 +01:00
wm4
5ab2aa84e0 Factor out setting AVCodecContext extradata 2014-03-11 00:07:51 +01:00
Stefano Pigozzi
229d398ba9 cocoa: fix deadlock during initialization [2]
Fixup commit for 20fa191ad.
2014-03-11 00:04:15 +01:00
wm4
5f1b155307 build: bump libmpg123 version
The minimum required version was bumped in the old configure script, but
for the waf build system is was somehow forgotten or overlooked.
Probably happened while the waf build system was developed in a separate
branch.

Closes #546.
2014-03-11 00:04:10 +01:00
Stefano Pigozzi
241cbe5065 cocoa: fix deadlock during initialization
Thanks to @wm4 for catching the bug.

Fixes #405
2014-03-11 00:04:07 +01:00
wm4
76d771a6fa Release 0.3.5 2014-02-12 22:39:52 +01:00
nand
19caba0794 vo_opengl: make :srgb decompand the BT.709 values correctly
This is the same issue as addressed by 257d9f1, except this time for
the :srgb option as well. (257d9f1 only addressed :icc-profile)

The conditions of the srgb_compand mix() call are also flipped to
prevent an off-by-one error.
2014-02-12 22:34:44 +01:00
wm4
391546c52f command: fix metadata property
This crashed when retrieving the raw property value. Oops.
2014-02-12 22:34:28 +01:00
Alexander Preisinger
a8af6a7852 wayland/shm: prevent the window from flying away
With the new xdg_shell the problem will be no gone by itself.
2014-02-12 22:34:09 +01:00
wm4
960aca3386 manpage: document --aspect special values
Use of these is "discouraged", but they're there to select these special
cases with the "aspect" property. They really should use some sort of
choice option type, but since it would be some work to make these work
with float values, the simple and dumb alternative was picked.
2014-02-12 22:33:54 +01:00
wm4
e72a327d74 video: fix --no-aspect
This also affects the --aspect option and the "aspect" property.
2014-02-12 22:33:52 +01:00
nand
87f955f3e9 vo_opengl: fix typo in gamma function's parameter
The correct value is 0.081, not 0.18. The scale factor also needed
slight adjustment due to the order of operations.
2014-02-12 22:33:32 +01:00
Jonas Zetterberg
5536ebe82f vo_vdpau: Discard zero timestamps
Some drivers do not supply timestamps, use old timestamp in these conditions.
2014-02-12 22:33:29 +01:00
Jonas Zetterberg
ef8b37ca2a vo_vdpau: Ensure presentation time is within bounds
When a time sync happens the last sync time is the minimum time that can be
used for presentation.
2014-02-12 22:33:27 +01:00
wm4
d4a5513847 demux: fix some newlines in output messages 2014-02-12 22:33:09 +01:00
wm4
d42212cd67 player: fix an assert when reinitializing audio in some cases
This sometimes happened when changing playback speed (= reinitializing
audio) after seeking of playback start. The assertion in audio.c:441 was
triggered, because buffer_playable_samples wasn't reset correctly when
the audio buffer was cleared or shortened. The assertion is correct and
should hold up any time.
2014-02-12 22:33:03 +01:00
nand
674cc1d3a9 vo_opengl: use exactly the values defined by BT.709 for CMS
I could not see any difference whatsoever, but for usage with a 3DLUT
there's zero performance difference so we might as well follow the spec to
the letter.
2014-02-12 22:32:56 +01:00
wm4
c47bb9ca42 gl_x11: don't require a X visual for modern GL context creation
Legacy GL context creation (glXCreateContext) explicitly requires a X
visual, while the modern one (glXCreateContextAttribsARB) does not for
some reason. So fail only on the legacy code path if we don't find a
visual. Note that vo_x11_config_vo_window() will select a default visual
if a NULL visual is passed to it.
2014-02-12 22:32:43 +01:00
wm4
938dad0b88 gl_x11: always request true color visual
This fixes issue #504. For some reason, glXChooseFBConfig() will return
a fbconfig with no associated visual. (I'm not sure if this allowed.
They don't always have a visual, but since GLX_X_RENDERABLE is set
and GLX_DRAWABLE_TYPE is (implicitly) set to GLX_WINDOW_BIT, why would
there be no visual?)

Even worse, a test program seems to show that a 16 bit fbconfig is
selected (instead of 24/32 bit), which doesn't sound nice at all. Since
there _are_ better fbconfigs available, glXChooseFBConfig() should
normally sort them by quality, and return the better ones first. It's
worth noting that this function should also prefer GLX_TRUE_COLOR
over anything else, although this comes last in the sort order.

Whatever is going on, requesting GLX_X_VISUAL_TYPE with GLX_TRUE_COLOR
seems to fix it.
2014-02-12 22:32:40 +01:00
wm4
82b5361946 umpv: silence mpv terminal output
Now it does basically the same as mkv.desktop. Explanation is included
in the description comment.
2014-02-12 22:32:06 +01:00
wm4
f99f48684b umpv: improve description 2014-02-12 22:32:04 +01:00
wm4
25864a5539 umpv: use --force-window
This makes it show a window even when playing audio-only files.
2014-02-12 22:32:02 +01:00
wm4
524d9585fd audio: fix signedness of AF_FORMAT_S32P
This was marked as unsigned, but it's signed. Found by xylosper.
2014-02-12 22:32:00 +01:00
wm4
95a72baf92 mf: don't limit filename length with PATH_MAX
Use an arbitrary constant instead, which is as good as PATH_MAX.

This helps us to avoid having to think about pull request #523.

Also fix a case where a potentially signed char was passed to isspace().
2014-02-12 22:31:54 +01:00
wm4
48112a74ed player: refresh OSD on track switching
Apparently, at least sub_reload was missing a refresh at all.
2014-02-12 22:31:40 +01:00
Alexander Preisinger
8427cdc717 wayland: change minimum version
Change minimum version to 1.3 and remove the version checking in the source
code.
2014-02-12 22:31:27 +01:00
wm4
b695ca1e27 x11: fix initial VO size
This was done incorrectly in the previous commit: the fallback size used
the window size as requested with the first config call, which is the
size of the hidden window in the vo_opengl case. (That damn hidden
window again...)

Conflicts:
	video/out/x11_common.c
2014-02-12 22:31:21 +01:00
wm4
801feb6420 x11: remove apparently useless code
This code essentially does nothing. As far as I could find out, this
actually used to do something. Then it was removed with commit efe7c39f,
leaving some leftover code that didn't do anything useful. This happened
12 years ago!

Also remove a commented debug printf.
2014-02-12 22:30:34 +01:00
wm4
de6a452039 x11: fix race condition when setting aspect when leaving fullscreen
vo_opengl creates a hidden X11 window to probe the OpenGL context. It
must do that before creating a visible window, because VO creation and
VO config are separate phases.

There's a race condition involving the hidden window: when starting with
--fs, and then leaving fullscreen, the unfullscreened window is
sometimes set to the aspect ratio of the hidden window. I'm not sure why
the window size itself uses the correct size (but corrupted by the wrong
aspect), but that's perhaps because the window manager is free to ignore
the size hint while honoring the aspect, or something equally messed up.

It turns out this happens because x11_common.c thinks the size of the
hidden window is the size of the unfullscreened window. This in turn
happens because vo_x11_update_geometry() reads the size of the hidden
window when called in vo_x11_fullscreen() (called from
vo_x11_config_vo_window()) when mapping the fullscreen window. At that
point, the window could be mapped, but not necessarily. If it's not
mapped, it will get the size of the unfullscreened window... I think.

One could fix this by actively waiting until the window is mapped. Try
to pick a less hacky approach instead, and never read the window size
until MapNotify is received.

vo_x11_create_window() needs a hack, because we'd possibly set the VO's
size to 0, resulting e.g. in vdpau to fail initialization. (It'll print
error messages until a proper resize is received.)

Conflicts:
	video/out/x11_common.c
2014-02-12 22:30:23 +01:00
wm4
4b764b6cc6 old-configure: use -std=c99
See previous commit.
2014-02-12 22:29:50 +01:00
wm4
7b7c31b190 build: switch to -std=c99 for saner float semantics
This fixes a weird bug with aspect ratio handling. It has to do with
float handling: with -std=gnu99, gcc implicitly enables broken non-
standard semantics giving float variables excess precision. This can for
example make this fail in theory: "float a = 0.1; assert(a == a);"

While standard C allows excess precision _within_ expressions, it
requires truncation when storing float values in variables of types
"float" or "double". The "gnu99" mode breaks this. It can be unbroken by
using "c99", or by specifying -fexcess-precision=standard. The former
seems less likely to break compilers other than modern gcc. Note that
-ffloat-store would also fix this, but also makes float expressions less
efficient and less precise for no reason.

The code that mistakenly fails because of this is dec_video.c line 393.
It caused the container aspect to be ignored in some or all situations,
depending how the compiler optimizes. For example, on gcc-4.6 with -Os,
the aspect is always ignored.

In future, we should probably just get rid of storing aspects as floats.

Note: requires mingw-w64 trunk for math.h fixes (M_PI was hidden).
2014-02-12 22:29:21 +01:00
wm4
70a66b461d cache: refuse to seek outside of cache boundaries
Note that this still happens in the stream level, so we can't have
nice highlevel behavior restricting seeking. Instead, if a seek leads
to the demuxer requesting data outside of the cached range, the seek
will simply fail. This might confuse the demuxer, and the resulting
behavior is not necessarily useful.

Note that this also doesn't try to skip data on a forward seek. This
would just freeze the stream with slow unseekable streams.

One nice thing is that stream.h has a separate function for merely
skipping data (separate from seeking forward), which is pretty useful
in this case: we want skipping of data to work, even if we reject
seeking forward by skipping data as too expensive. This probably is
or will be useful for demux_mkv.c.
2014-02-12 22:29:11 +01:00