Commit Graph

37085 Commits

Author SHA1 Message Date
Martin Herkt e3ab2ac112 manpage: mention --pause 2014-01-03 20:35:10 +01:00
wm4 79a8018ca2 dvdnav: set correct stride for fake highlights
This didn't really matter, because the fake highlight rectangle is in a
single color, and every pixel has the same color value.
2014-01-03 16:45:59 +01:00
wm4 6e6291dcfd stream_pvr: fix crash on initialization
Fallout from the mp_msg conversions.
2014-01-03 16:44:44 +01:00
wm4 52ed634811 audio: check for overflows 2014-01-03 00:42:40 +01:00
wm4 7ed4ce91e8 bstr: check for overflow in buffer allocation
We're being a little bit lazy here and limit the max allocation to
SIZE_MAX/2, which is practically infinite anyway on 64 bit systems.
2014-01-03 00:34:15 +01:00
wm4 2cad237f8b ta: check overflow in array realloc macros 2014-01-02 23:54:59 +01:00
Stefano Pigozzi d4f37174a1 vda: fix build on OS X 10.7
Looks like on 10.8 OpenGL.h recursively includes CGLIOSurface.h. That is not
the case for 10.7 so the build was broken on that version of OS X.
2014-01-02 22:45:39 +01:00
wm4 d4588bf577 ao_alsa: remove 9 year old typo
Actually, remove the whole comment, because it's outdated and
get_space() returns the number of free samples now.
2014-01-02 21:29:33 +01:00
Stefano Pigozzi fb2d418327 build: fix cocoa configure check on OS X 10.7
It failed because the 10.7 SDK doesn't natively support array and dictionary
subscripting.
2014-01-02 20:42:03 +01:00
Alexander Preisinger 52fa38079d wayland/opengl: fix garbage borders
It seems mpv draws garbage in those regions. Now we calculate the aspect and
let weston draw the black borders.
2014-01-02 20:33:39 +01:00
Alexander Preisinger ba101abfbe wayland/shm: only commit new frames
Only attach and commit new buffers. This also increases performance when
paused.
2014-01-02 20:33:31 +01:00
Alexander Preisinger e947c72fe9 wayland: don't change set fullscreen twice
Newest weston chrashes if we call set_fullscreen twice. This is a major bug
I which I should probably report.
2014-01-02 20:33:06 +01:00
Martin Herkt 4350a76a01 ao_alsa: Unbreak pause/resume
Well that was dumb.
2014-01-02 18:46:11 +01:00
Martin Herkt 4083ae1de3 ao_alsa: Fix PCM resume after suspend
Fixes #324
2014-01-02 16:09:27 +01:00
Martin Herkt 1437d9b8bc Add Windows console wrapper program (mpv.com) 2014-01-02 05:30:49 +01:00
Martin Herkt e9f577eb9a Windows: use the GUI subsystem, attach to console
This is necessary to start mpv without forcing a console window,
but also breaks console usability. A workaround is to call mpv
from a wrapper process that uses the console subsystem and helps
redirecting the standard streams and WriteConsole output to where
they belong.
2014-01-02 05:30:49 +01:00
Martin Herkt fd89a75988 osdep/io, mp_vfprintf: split out console detection 2014-01-02 05:30:49 +01:00
wm4 b04b48fc10 stream: always respect sector_size, fixes cdda://
Streams like CDDA have special requirements in what quantities data can
be read: you can only read a sector at once, not more and not less. The
stream_peek() function didn't respect that and set less (used internal
buffer size of 2048 bytes, instead of CD sector size of 2352 bytes), so
no data was read and EOF was accidentally set, making playback with
cdda:// fail.

This is a regression since commit 9a723f, but that commit merely exposed
the issue (the redundant seek would clear the EOF flag).
2014-01-02 00:39:14 +01:00
Stefano Pigozzi b467df073e build: fix typo 2014-01-01 21:44:05 +01:00
Stefano Pigozzi e568299c2c build: make configure fail if both __atomic and __sync are not available 2014-01-01 20:52:54 +01:00
wm4 faf68f3b8e manpage: clarifications about bitmap subtitles and --secondary-sid 2014-01-01 19:45:34 +01:00
wm4 2214ee8472 options: make --msglevel=help print something helpful 2014-01-01 19:42:48 +01:00
wm4 cf4a110261 manpage: fix description on the slave mode msglevel 2014-01-01 19:28:17 +01:00
wm4 9169737a47 player: load encoding-profiles.conf before the main config
Otherwise one can't add profiles based on the encoding profiles.
2014-01-01 19:25:52 +01:00
Miro Hrončok bbdd030a58 mpv.desktop: Add Czech translations 2014-01-01 18:53:33 +01:00
wm4 aeb9e6ddf5 player: fix DVD playback
Crashed in case of lazily added subtitle streams, which add tracks with
track->stream set to NULL.

Fixes gituhub issue #439.
2014-01-01 16:18:54 +01:00
wm4 66fe4f5713 Update copyright year 2014-01-01 00:00:00 +01:00
Alessandro Ghedini 4530d787d0 compat: use __atomic operations instead of __sync, when present
Fixes #434
Fixes #437
2013-12-31 10:53:36 +01:00
Alessandro Ghedini e19060d89f build: check for libatomic and __atomic operations
Add check in old-configure as well. Reformat the check to use a maximum of 80
columns in the wscript.
Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2013-12-31 10:53:36 +01:00
wm4 548aa81196 manpage: fix vf_noise parameter name 2013-12-30 22:50:01 +01:00
wm4 ec539dad2b common: drop mp_append_utf8_buffer() 2013-12-30 22:49:51 +01:00
wm4 7639e05ea8 bstr: use mp_append_utf8_bstr()
Drop usage of the ugly PUT_UTF8() macro.
2013-12-30 22:49:51 +01:00
wm4 b0efd3f36a input: use bstr_xappend()
To get rid of mp_append_utf8_buffer().
2013-12-30 22:49:51 +01:00
wm4 963a3d2c64 osd_libass: use bstr_xappend()
Partially, just enough to drop mp_append_utf8_buffer().
2013-12-30 22:49:50 +01:00
wm4 066ecfcbfb common: simplify and optimize string escape parsing
This code is shared between input.conf parser and option parser. Until
now, the performance didn't really matter. But I want to use this code
for JSON parsing too, and since JSON will have to be parsed a lot, it
should probably try to avoid realloc'ing too much.

This commit moves parsing of C-style escaped strings into a common
function, and allows using it in a way realloc can be completely
avoided, if the already allocated buffer is large enough.
2013-12-30 22:49:50 +01:00
wm4 097fe8ea6f bstr: add bstr_xappend function
Apparently this can be really useful when being paranoid and trying to
avoid too much malloc/realloc, since it can be used to appending into a
buffer (with transparent realloc only if the buffer is too small).
2013-12-30 22:49:50 +01:00
wm4 56ce2a39be video: fix --brightness etc. options
They were set before the VO was intitialized, which silently failed.
2013-12-29 22:18:27 +01:00
Stefano Pigozzi f06a870b88 build: add flag for inline assembly
This is used to disable inline assembly (useful for old version of binutils
like the one in OpenBSD).
2013-12-29 17:39:18 +01:00
wm4 392856ed4d vd_lavc: by default, output all frames, even corrupted ones
Set the flag CODEC_FLAG_OUTPUT_CORRUPT by default. Note that there is
also CODEC_FLAG2_SHOW_ALL, which is older, but this seems to be ffmpeg
only.

Note that whether you want this enabled depends on the user. Some might
prefer that only good frames are output, while others want the decoder
to try as hard as possible to output _anything_. Since mplayer/mpv is
rather the kind of player that tries hard instead of being "clever", set
the new default to override libavcodec's default.

A nice way to test this is switching video tracks. Since mpv doesn't
wait for the next key frame, it'll start feeding the decoder with a
packet from the middle of the stream.
2013-12-29 14:19:22 +01:00
wm4 15f38b89ee player: add two more font mimetypes recognized by Haali
The Haali Matroska splitter is basically the reference implementation
for this crap, and it knows only:

    application/vnd.ms-opentype
    application/x-font-ttf
    application/x-truetype-font

Two of them were missing in our code. One of them, "application/x-font",
is probably plain incorrect, but I can't really tell.

Also see: http://www.cccp-project.net/beta/test_files/fontsample.mkv
2013-12-29 14:19:22 +01:00
wm4 6878cf2832 player: use arrays to list font mimetypes and font file extensions 2013-12-29 14:19:22 +01:00
Stefano Pigozzi fc583e74ec build: disable SDL by default
old-configure already behaves like this. Adapt wscript to the same default.
2013-12-29 14:14:09 +01:00
wm4 fd4e3af740 Install encoding-profiles.conf by default
This is probably useful.

Note that this includes a small, stupid hack to prevent loading of the
config file if vf_lavfi is not available. The profile by default uses
vf_lavfi, and the config parser will output errors if vf_lavfi is not
available.

As another caveat, we install the example profile even if encoding is
disabled (though we don't load it, since this would print errors).
2013-12-28 16:33:21 +01:00
wm4 a473739fbf player: fix buggy error condition when loading mpv.conf 2013-12-28 15:46:07 +01:00
ahodesuka 62be13b019 vo/x11_common: do not select motion events when --no-mouse-movements is set 2013-12-28 15:07:01 +01:00
wm4 4b695e7972 input: print an error if reading input.conf fails
stream_read_complete() fails if the file is larger than the requested
maximum size. But input.c didn't check for this case, and no indication
that something went wrong was printed.
2013-12-28 15:06:43 +01:00
wm4 f146e9b15a Revert "x11: don't set global error handler"
This reverts commit 877303aaa9.

The OpenGL 2.1 fallback for vo_opengl didn't work. Two things come
together: 1. trying to create an OpenGL 3.0 context will fail with
a GLXBadFBConfig error, and 2. X errors are fatal by default. Since
the reverted commit removed the X error handler, the mpv process was
killed, instead of continuing for the fallback.

(Note that this commit is not an exact inverse commit, since mp_msg
changed, but it does about the same thing.)
2013-12-27 23:22:46 +01:00
wm4 3e562583e5 demux_mkv: handle TrueHD properly
Apparently, Matroska packs TrueHD packets in a way lavc doesn't expect.
This broke decoding of some files [1] completely. A short look at the
libavcodec parser shows that parsing this ourselves would probably be
too much work, so make use of the libavcodec parser API.

[1] http://www.cccp-project.net/beta/test_files/mzero_truehd_sample.mkv
2013-12-27 20:00:24 +01:00
Stefano Pigozzi b205e63cdc Revert "cocoa: unlock on uninit"
Not sure why but this doesn't seem to be needed anymore.

This reverts commit 6ead6aa005.
2013-12-26 22:26:41 +01:00
Stefano Pigozzi 2e8b6419bd corevideo: fix video initialization when not using VDA
query_format was setting state even if wasn't the correct thing to do. Somehow
it worked by pure luck (until commit e6e6b88b6d).

Fix the initialization by setting state inside of reconfig.
2013-12-26 22:11:49 +01:00