summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* travis: add gcc to the build matrixwm42014-11-241-0/+4
| | | | | | | | For the purpose of running Coverity correctly. Although I'm not sure how well this works. gcc won't work on OSX, and also I'm not sure if Coverity will act up if the build matrix has more than 1 configuration (will it submit multiple scans?).
* input: simplifywm42014-11-245-38/+25
|
* lua: remove redundant callwm42014-11-241-1/+0
|
* lua: always handle key repeat on the script sidewm42014-11-242-5/+8
| | | | | | Simpler, and leaves the decision to repeat or not fully to the script (instead of requiring the user to care about it when remapping a script binding).
* lua, ipc: remove leftoverswm42014-11-243-19/+0
| | | | | | MPV_EVENT_SCRIPT_INPUT_DISPATCH is now unused/deprecated. Also remove a debug-print from defaults.lua.
* command: don't queue framestepswm42014-11-232-1/+15
| | | | | If repeated framestep commands are sent, just unpause the player, instead of playing N frames for N repeated commands.
* player: don't crash when using sub_seek without subtitleswm42014-11-231-2/+0
| | | | | | Recent regression. It turns out the assertion was completely unneeded. Fixes #1285.
* input, lua: redo input handlingwm42014-11-2312-79/+211
| | | | | Much of it is the same, but now there's the possibility to distinguish key down/up events in the Lua API.
* client API: restrict client nameswm42014-11-232-20/+22
| | | | | | Use a fixed size array for the client name, which also limits the client name in size. Sanitize the client name string, and replace characters that are not in [A-Za-z0-9] with '_'.
* x11: fix crashwm42014-11-231-1/+1
| | | | Broken by previous commit. Oops.
* x11: fix crash with --wid=0 and vo_xv/vo_x11wm42014-11-231-2/+5
| | | | | | | But seriously, don't use --wid=0, don't use vo_xv, and _especially_ don't use vo_x11. Fixes #1284.
* input: set mouse area by default for all inputwm42014-11-232-2/+3
| | | | | | | | | | Otherwise, mouse button bindings added by mp.add_key_binding() would be ignored. It's possible that this "breaks" some older scripts using undocumented Lua script functions, but it should be safe otherwise. Fixes #1283.
* subprocess: minor cosmetic cleanupwm42014-11-223-5/+9
| | | | | Don't recursively include the whole stream.h header; only include what's minimally needed, and handle the rest with forward declarations.
* README: cleanup contact sectionwm42014-11-221-7/+7
| | | | | I spotted to the grammatically incorrect "it's", and ended up redoing parts of the section.
* lua: subprocess: move to osdep/subprocess-{win,posix}.cJames Ross-Gowan2014-11-226-478/+553
| | | | | | The subprocess code was already split into fairly general functions, separate from the Lua code. It's getting pretty big though, especially the Windows-specific parts, so move it into its own files.
* manpage: update utils.subprocess() for WindowsJames Ross-Gowan2014-11-221-2/+3
|
* lua: subprocess: use macros for SetHandleInformationJames Ross-Gowan2014-11-221-1/+2
| | | | | Apparently both parameters refer to the same set of flags (the first is a mask for which flags to set.)
* lua: subprocess: fix handle inheritance race conditionJames Ross-Gowan2014-11-221-11/+87
| | | | | | | | | | | | | | | Normally, when creating a process with inherited handles on Windows, the process inherits all inheritable handles from the parent, including ones that were created on other threads. This can cause a race condition, where unintended handles are copied into the new process, preventing them from being closed correctly while the process is running. The only way to prevent this on Windows XP was to serialise the creation of all inheritable handles, which is clearly unacceptable for libmpv. Windows Vista solves this problem by allowing programs to specify exactly which handles are inherited, so do that on Vista and up. See http://blogs.msdn.com/b/oldnewthing/archive/2011/12/16/10248328.aspx
* lua: subprocess: fix Ctrl+C handling on WindowsJames Ross-Gowan2014-11-221-3/+11
| | | | | | | | | | | | The CREATE_NO_WINDOW flag is used to prevent the subprocess from creating an empty console window when mpv is not running in a console. When mpv is running in a console, it causes the subprocess to detach itself, and prevents it from seeing Ctrl+C events, so it hangs around in the background after mpv is killed. Fix this by only specifying CREATE_NO_WINDOW when mpv is not attached to a console. When it is attached to a console, subprocesses will automatically inherit the console and correctly receive Ctrl+C events.
* lua: subprocess: cancel pending I/O before returnJames Ross-Gowan2014-11-221-2/+7
| | | | | | | I'm not sure if this is necessary, but it can't hurt, and it's what you're supposed to do before leaving the stack frame that contains the OVERLAPPED object and the buffer. If there is no pending I/O, CancelIo will do nothing and GetOverlappedResult will silently fail.
* TOOLS/idet.sh: Adjust for changes in FFmpeg.Rudolf Polzer2014-11-221-5/+1
| | | | Compatibility to older idet is preserved.
* parse_configfile: check quote termination properlywm42014-11-211-0/+7
| | | | | | This is some terrible code; I blame MPlayer legacy. Found by Coverity.
* m_property: fix a typowm42014-11-211-1/+1
| | | | | | The wrong value was checked for an error. Oops. Found by Coverity.
* ao_pcm: simplifywm42014-11-211-17/+13
| | | | Also shuts up Coverity.
* ao_oss: check whether setting samplerate succeedswm42014-11-211-2/+4
| | | | | | | Independent from whether the samplerate was accepted or adjusted, errors returned by the ioctl are fatal errors. Found by Coverity.
* ao_lavc: fix setting up AVFrame pointerswm42014-11-211-3/+4
| | | | | | The caller set up the "start" pointer array using the number of planes, the encode() function used the number of channels. This copied uninitialized values for packed formats, which makes Coverity warn.
* af_scaletempo: use float division for ratewm42014-11-211-1/+1
| | | | | | | | From what I understand the division is to align the dimension of the value from seconds to milliseconds. Hard to tell whether the "rounding" was intentional or not; I'm tipping on "not". Found by Coverity.
* Silence some Coverity warningswm42014-11-214-2/+4
| | | | None of this really matters.
* Remove some unneeded NULL checkswm42014-11-214-25/+22
| | | | Found by Coverity; also see commit 85fb2af3.
* README: add Coverity statuswm42014-11-211-0/+2
| | | | Because it looks nice.
* draw_bmp: make code more obvious, remove assertionwm42014-11-211-3/+3
| | | | | | | Silences a Coverity warning. Also, drop the assert(); although it should be pretty much guaranteed that things happen this way, it's still a bit fuzzy.
* stream: fix endian swappingwm42014-11-211-2/+2
| | | | | | | | | | In addition to the messed-up expression, the endianness was also inverted. The code reads big endian by default. It "worked" by coincidence, but for little endian, codepoints outside of latin1 were broken. The broken expression was found by Coverity.
* bstr: don't call memcpy(..., NULL, 0)wm42014-11-211-0/+2
| | | | | | This is clearly not allowed, although it's not a problem on most libcs. Found by Coverity.
* Remove some superfluous NULL checkswm42014-11-214-7/+3
| | | | | | | | In all of these situations, NULL is logically not allowed, making the checks redundant. Coverity complained about accessing the pointers before checking them for NULL later.
* ipc: fix confusion of write() return value and errnowm42014-11-211-3/+3
| | | | Found by Coverity.
* demux_mkv: fix scary sign extension issueswm42014-11-211-8/+8
| | | | | | | Expressions involving uint16_t are promoted to int, which then can overflow if the uint16_t values are large enough. Found by Coverity.
* demux_mkv: fix possible real-audio out of bounds accesseswm42014-11-211-1/+7
| | | | | | | Could index static arrays from arbitrary input data without checking for bounds. Found by Coverity.
* demux_mkv: fix uninitialized variablewm42014-11-211-1/+1
| | | | Found by Coverity.
* audio/out/push: fix off-by-one errorwm42014-11-211-1/+1
| | | | | | Needs 1 additional free entry. Found by Coverity.
* ao_lavc: fix dangling pointerswm42014-11-211-1/+1
| | | | Found by Coverity.
* travis: another attempt (2)wm42014-11-211-5/+6
| | | | They said YAML is "simple"...
* travis: another attemptwm42014-11-211-4/+2
| | | | I guess it didn't like the duplicate env section.
* build: don't build win32 mpv.com wrapper with --disable-cplayerwm42014-11-211-13/+14
| | | | It'll be useless.
* travis: attempt to add Coverity integrationwm42014-11-211-0/+15
| | | | | Not sure if this will work. Probably not, because it seems Coverity will be missing some required dependencies.
* lua: add a way to add repeatable key bindingswm42014-11-212-4/+10
| | | | For these, autorepeat is enabled.
* input: add a prefix to make any binding act on key repeatwm42014-11-205-4/+10
| | | | | | The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way.
* command: dvd: better audio/video recovery on angle switchingwm42014-11-201-5/+2
| | | | | | | | Does the same thing as the drop_buffers command. When implementing that command, it turned out that resetting the higher level playback state was more effective for achieving smooth recovery. Untested; I don't even have any DVDs or DVD images with multiple angles.
* command: add drop_bufferswm42014-11-204-0/+18
| | | | | | | | | | | | | | | This command was actually requested on IRC ages ago, but I forgot about it. The main purpose is that the decoding state can be reset without issuing a seek, in particular in situations where you can't seek. This restarts decoding from the middle of the packet stream; since it discards the packet buffer intentionally, and the decoder will typically not output "incomplete" frames until it has recovered, it can skip a large amount of data. It doesn't clear the byte stream cache - I'm not sure if it should.
* demux_mkv: haali hack: add last frame duration to video length toowm42014-11-201-2/+3
| | | | | From what I can see, only the blockduration of the packet needs to be added, never the "default duration".
* Catch SIGPIPEwm42014-11-201-0/+3
| | | | | | | | | | | | | | Avoids a crash if OpenSSL tries to write to a broken connection with write(). Obviously OpenSSL really should use send() with MSG_NOSIGNAL, but for some reason it doesn't. This should probably be considered an OpenSSL bug, but since in this case we "own" the process, there is no harm in ignoring the signal. This is not done with libmpv, because as a library we don't want to mess with global state. It's also not done if terminal handling is disabled - this is a bit arbitrary, but I don't care much.
* vd_lavc: flush frames before uninitializing hw decoderwm42014-11-201-0/+3
| | | | | | This way, no surfaces are in use when uninitializing the hw decoders, which might help with -copy hw decoders (normal hw decoding is not affected).
* options: add --ytdl-format option for youtube-dl formatJaime Marquínez Ferrándiz2014-11-204-3/+22
| | | | | | | | | It's passed with the '--format' option to youtube-dl. If it isn't set, we don't pass '--format best' so that youtube-dl can use the options from its configuration file. Signed-off-by: wm4 <wm4@nowhere>
* manpage: changes.rst: add youtube-dl scriptwm42014-11-191-0/+4
|
* input.conf: add some additional bindingswm42014-11-192-0/+11
|
* player: integrate ytdl_hook.luawm42014-11-197-18/+28
|
* lua: add youtube-dl hook scriptChrisK22014-11-191-0/+163
| | | | | | | This merely adds the file without using it, for the sake of retaining authorship information. Signed-off-by: wm4 <wm4@nowhere>
* manpage: fix typowm42014-11-191-1/+1
|
* demux_mkv: add an option for compatibility with Haaliwm42014-11-185-0/+75
| | | | This was requested on IRC.
* manpage: document vo_cmdline commandwm42014-11-181-1/+8
|
* command: add an ab_loop commandwm42014-11-185-2/+31
| | | | | | As suggested in #1241; to make using the feature easier. Also add better OSD-formatting for the ab-loop-a/b properties.
* command: improve A-B loop behaviorwm42014-11-183-3/+16
| | | | | | If the B point is set, then loop back to A. Also, update the OSD bar if necessary.
* ao/wasapi: actually only retry once (not twice)Kevin Mitchell2014-11-181-2/+1
|\ | | | | | | oops
| * ao/wasapi: only retry resizing the buffer onceKevin Mitchell2014-11-181-8/+10
| | | | | | | | | | | | like the MSDN example: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx
* | vo_direct3d: fix texture-memory sub-option, extend itwm42014-11-182-16/+35
| | | | | | | | | | | | | | | | | | | | This sub-option was turned into a flag when the sub-option parser was changed to the generic one (probably accidentally). Turn it into a proper choice-option. Also, adjust what the options do. Though none of this probably makes much sense; the default should work, and if it doesn't, the GPU/driver is probably beyond help.
* | ao/wasapi: only retry resizing the buffer onceKevin Mitchell2014-11-181-8/+11
|/ | | | | | like the MSDN example: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx
* ao/wasapi: keep bufferPeriod in sync on retryKevin Mitchell2014-11-181-1/+4
| | | | | Without this, the retry will fail if they are not equal or bufferPeriod is zero.
* ao/wasapi: refix printf warning for both cygwin and msysKevin Mitchell2014-11-181-2/+2
| | | | a cast to (unsigned) should do "the right thing".
* ao/wasapi: periodicity in shared mode must be zeroKevin Mitchell2014-11-181-3/+6
| | | | | | IAudioClient::Initialize hnsPeriodicity argument is nonzero only for exclusive mode http://msdn.microsoft.com/en-us/library/windows/desktop/dd370805%28v=vs.85%29.aspx
* ao/wasapi: increase buffer size to 50 msKevin Mitchell2014-11-183-16/+26
| | | | | Before it was the default device period, which was too small causing glitches on on entering/exiting fullscreen.
* stream: reduce ifdeffery for win32 somewhatwm42014-11-182-16/+8
| | | | Remove the ones which are not strictly needed.
* lua: subprocess: support cancellation on WindowsJames Ross-Gowan2014-11-181-1/+9
|
* stream: signal a Windows event object on cancelJames Ross-Gowan2014-11-182-0/+35
| | | | | This will be used in the following commit to cancel subprocesses started by Lua.
* lua: subprocess: use overlapped I/O on WindowsJames Ross-Gowan2014-11-181-56/+133
| | | | | | | Instead of threads, use overlapped (asynchronous) I/O to read from both stdout and stderr. Like in d0643fa, stdout and stderr could be closed at different times, so a sparse_wait function is added to wrap WaitForMultipleObjects and skip NULL handles.
* command: initialize a-b loop options correctlywm42014-11-181-0/+1
| | | | | It was initialized as 0/0, which basically cleared the chapter marks by default.
* audio/out: always log retrieved audio device sizewm42014-11-181-2/+2
|
* ao/wasapi: fix leaked marshaled interface streamsJonathan Yong2014-11-181-0/+9
| | | | Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
* ao/wasapi: Don't free stuff the thread may still be using on timeoutKevin Mitchell2014-11-171-1/+3
| | | | | In the unlikely event of a timeout waiting for the audio thread to return, don't free stuff that it may still be using.
* ao/wasapi: also free the threadLoop handle on uninitKevin Mitchell2014-11-171-0/+1
| | | | http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx