summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.7.1v0.7.1Alessandro Ghedini2014-12-022-1/+31
|
* cocoa: fix opening reference URLs (.file/id=)Stefano Pigozzi2014-12-011-2/+4
| | | | | | Fixes #1202 /cc @mpv-player/stable
* vo_opengl: Linearize non-RGB sRGB files correctly (eg. JPEG)Niklas Haas2014-12-013-7/+48
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: Reword comment in shaderNiklas Haas2014-12-011-2/+3
| | | | | I didn't quite understand this comment after looking at the code again months later, so I reworded it for better clarity.
* vo_opengl: make operator precedence explicitwm42014-12-011-1/+2
| | | | More readable.
* ao_coreaudio: initialize fetched properties to zerosStefano Pigozzi2014-12-011-2/+2
| | | | Should hopefully fix #1249 and #1279
* options: fix channel map options sometimes failingwm42014-12-011-1/+1
| | | | | | | | | | Channel amp otpions were not copied correctly: it copied the size of a pointer to struct chmap, not the struct itself. Since mp_chmap is currently 9 bytes, this meant the last channel entry was not copied correctly on 64 bit systems, leading to very strange failures. It could be triggered especially when using the client API, because the client API always copies options on access (mpv command line options tend to work directly on options).
* options: fix swapped deprecated/replacement in warningwm42014-12-011-1/+1
| | | | | This was relevant for --af and --vo (both use this option type, and have deprecated aliases).
* player: simplify and fix ordered chapter EOF handlingwm42014-12-012-17/+11
| | | | | | | | | | | | | | Ordered chapter EOF was handled as special-case of ending the last segment. This broke --kee-open, because it set AT_END_OF_FILE in an "inconvenient" place (after checking for --keep-open, and before the code that exits playback if EOF is reached). We don't actually need to handle the last segment specially. Instead, we remain in the same segment if it ends. The normal playback logic will recognize EOF, because the end of the segment "cuts off" the file. Now timeline_set_from_time() never "fails", and we can remove the old segment EOF handling code in mp_seek().
* command: sub_add with "auto" should not always select a subtitle trackwm42014-12-011-1/+3
| | | | | | | | | | | Running "sub_add file.srt auto" during hook execution automatically selected the first added track. This happened because all tracks added with sub_add are marked as "external", and external subtitles are always selected by default. Fix this by negating the "external" flag when autoselecting subtitles during loading. The no_default flag exists for this purpose; it was probably added for libquvi originally, where we had the same issue.
* mixer: don't show softvol neutral marker on OSD if not using softvolwm42014-12-011-2/+2
| | | | Also fix the comment on the softvol field.
* vo_opengl: fix srgb with certain inputswm42014-12-011-1/+1
| | | | | | | | | Sampling from the source texture and scaling must always be done separately in this mode. Fix suggested by haasn. Still looks a bit wrong, though.
* vo_opengl: somethingwm42014-12-011-1/+1
| | | | | | Insert explanation here. Fixes #1023.
* audio: fix one of the previous commitswm42014-12-011-1/+1
| | | | | Fixes commit 52c51149. It broke multichannel (or possibly everything) for ao_alsa, ao_oss, ao_sndio.
* audio: allow more than 20 channel map entrieswm42014-12-014-8/+19
| | | | | | | | | | | | | This could trigger an assertion when using ao_alsa or ao_coreaudio. The code was simply assuming the number of channel maps was bounded statically (which was true at first in both AOs). Fix by using dynamic memory allocation. It needs to be explicitly enabled by the AOs by setting a temp context, because otherwise the memory couldn't be freed. (Or at least this seems to be the most elegant solution.) Fixes #1306.
* vd_lavc: don't crash if codec could not be openedwm42014-12-011-1/+1
| | | | Fixes #1307.
* demux_playlist: don't ignore last line in m3uwm42014-12-011-2/+2
| | | | | | | | If EOF is reached after reading a line, the EOF flag is set. This was a problem for the m3u code, which checked for EOF _after_ reading a line, which will discard the last line read. Also fix a typo in an unrelated part of the file.
* win32: add screen offset when handling overlarge windowswm42014-12-011-2/+2
| | | | | | | | | | | MS Windows doesn't allow windows larger than the screen, so we include a hack to make the window smaller. This hack recenters the window (what else would it do?). It didn't account for the virtual offset of the current screen, and it was reported that it forces the window to the first screen. Should fix #1292.
* build: fix typosStefano Pigozzi2014-11-281-2/+2
| | | | thanks to @Nikoli
* subprocess-win: remove a Vista-only flagJames Ross-Gowan2014-11-281-3/+2
| | | | | PIPE_REJECT_REMOTE_CLIENTS isn't supported on XP. It's not really needed, so remove it. Also fix error checking for CreateNamedPipe.
* demux_mkv: fix a possible out of bounds accesswm42014-11-281-6/+8
| | | | | | | | | | | | | The if branch has a weak check to test whether the codec_id is the short ID, and handles the long IDs in the else branch. The long IDs are all longer than 12 bytes long, so hardcoding the string offset to get the trailing part of the name makes sense. But the if condition checks for another thing, which could get the else branch run even if the codec_id is short. Fix the bogus control flow and check if the codec_id is long enough. One of these checks could be considered redundant, but include them both for defensive coding.
* audio: alternative fix for previous commitwm42014-11-281-4/+1
| | | | | | | This is a somewhat obscure situation, and happens only if audio starts again after it has ended (in particular can happens with files where audio starts later). It doesn't matter much whether audio starts immediately or some milliseconds later, so simplify it.
* audio: fix busy loop when seeking while pausedwm42014-11-281-2/+4
| | | | | | | | | | | | | | | | | | | | When playing paused, the amount of decoded audio is limited to a small amount (1 sample), because we don't write any audio to the AO when paused. The small amount could trigger the case of the wanted audio being too far in the future in the PTS sync code, which set the audio status to STATUS_DRAINING, which in turn triggered the EOF code in the next iteration. This was ok, but unfortunately, this triggered another retry in order to check resuming from EOF by setting the status to STATUS_SYNCING, which in turn lead to the busy loop by alternating between the 2 states. So don't try resyncing while paused. Since the PTS syncing code also calls ao_reset(), this could cause the pulseaudio daemon to consume some CPU time as well. This was caused by commit 33b57f55. Before that, the playloop was merely run more often, but didn't cause any problems. Fixes #1288.
* manpage: lua: fix typo paramater -> parameterAlessandro Ghedini2014-11-281-1/+1
|
* Release 0.7.0v0.7.0Alessandro Ghedini2014-11-253-0/+69
|
* demux_lavf: set PTS of first packet for formats with no timestampswm42014-11-251-0/+9
| | | | Makes time display work for some raw audio formats (*.shn).
* ao_alsa: fix channel map in pre-channel map API casewm42014-11-251-0/+1
| | | | Forgotten in commit 5d5f5b09.
* ao_alsa: always enable "plug" plugin for non-default devicewm42014-11-251-3/+2
| | | | | | | | | | | | | | This seems safer: otherwise, opening the AO could randomly fail if the audio formats happens to be not float. Unfortunately, this only works if the user does not select a device. Since ALSA devices are arbitrary strings, including plugins with complex parameters, it's not trivial or maybe even impossible to edit the string in a way the "plug" plugin is added. With --audio-device, it would be safe for users to select either "default" or one of the "plughw" devices. Everything else seems questionable.
* ao_alsa: select and set channel maps via channel map APIwm42014-11-251-28/+125
| | | | | | | | | | | | | | | | Use the ALSA channel map API for querying and selecting supported channel maps. Since we (probably?) want to be compatible with ALSA versions before the change, we still try to select the device name by channel map, and open that device. There's no way to negotiate a channel map before opening, so we're stuck with this approach. Fortunately, it seems these devices allow selecting and setting any other supported channel layout, so maybe this is not an issue at all. In particular, this avoids selecting the default (dmix) device, which can only do stereo. Most code is based on Martin Herkt <lachs0r@srsfckn.biz>'s alsa_ng branch, with heavy modifications.
* ao_alsa: minor fixeswm42014-11-251-4/+6
| | | | | | | | | | | | | Don't crash if no fallback channel layout could be found (caller can't handle NULL return from select_chmap()). Apparently this could never actually happen, though. Don't treat snd_pcm_hw_params_set_periods_near() failure as fatal error. Same deal as with snd_pcm_hw_params_set_buffer_time_near(). Actually free channel maps returned by snd_pcm_get_chmap(). Adjust some messages.
* client API: make sure youtube-dl is not used by defaultwm42014-11-251-0/+1
| | | | | | | Currently, --ytdl is off by default, but even if this is changed, never enable it by default for the client API. It would be inappropriate to start an intrusive external subprocess behind the host application's back.
* cocoa: don’t hand over view memory ownership to libmpv clientsStefano Pigozzi2014-11-251-1/+1
|
* audio: make mp_audio_config_to_str return a stack-allocated stringwm42014-11-254-23/+12
| | | | Simpler overall.
* ao_alsa: cleanupswm42014-11-251-97/+57
| | | | | | | | | No functional changes. ALSA_PCM_NEW_HW_PARAMS_API was a pre-ALSA 1.0.0 thing and does nothing with modern ALSA. It stopped being necessary about 10 years ago. 3 functions are moved to avoid forward references.
* player: add option not to use OSD/fontconfigwm42014-11-254-0/+16
| | | | | | | Makeshift-solution for working around certain fontconfig issues. With --use-text-osd=no, libass and fontconfig won't be initialized, and fontconfig won't block everything with scanning for fonts.
* audio: make mp_chmap_to_str() return a stack-allocated stringwm42014-11-246-27/+25
| | | | Simplifies memory management.
* ao_alsa: try to use the channel map reported by ALSAwm42014-11-242-1/+66
| | | | | | | | If ALSA reports a channel map, and it looks like it makes sense (i.e. could be converted to mpv channel map, and the channel count matches), then use that instead of the channel map we are assuming. This is based on code written by lachs0r (alsa_ng branch).
* travis: restrict build matrix furtherwm42014-11-241-0/+4
| | | | | | | | | | | | | | | | We don't actually want to test all possible combinations; we just want to make sure that each thing (e.g. linux/osx, ffmpeg/libav) is tested once. Exclude Linux + ffmpeg-stable, because ffmpeg-stable is already tested on OSX. Exclude clang on Linux, because OSX needs clang, but Coverity (running on Linux) needs gcc - so we use gcc only on Linux. I also wanted to reduce the matrix to a single configuration when running Coverity, but apparently this is not possible. (See travis-ci/travis-ci#1975.)
* 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<