summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* player: don't ignore relative seeks by 0 secondswm42015-01-251-4/+0
| | | | | | | I don't know why this done; most likely it had no real reason. Remove it because it breaks "refresh seeks" to the same position. (Although the refresh seeks mpv sometimes does were fine.)
* command: avoid returning invalid FPS valueswm42015-01-251-3/+5
| | | | It's possible that fps is sometimes 0 in case it's unset.
* player: reset frame step counter on seekswm42015-01-252-1/+1
| | | | | I suppose this wasn't done in order to keep the frame step counter active even in the next file, but actually it was reset anyway.
* lua: add a function that formats Lua values as stringswm42015-01-253-24/+27
| | | | | | | | Yep, Lua is so crappy that the stdlib doesn't provide anything like this. Repurposes the undocumented mp.format_table() function and moves it to mp.utils.
* build: don't install some files if only libmpv is builtwm42015-01-251-13/+15
| | | | | | | encoding-profiles.conf can be used by libmpv, but it won't load it from this path by default, so exclude it as well. Fixes #1293.
* ao/wasapi: handle VistaBlob failure more gracefullyKevin Mitchell2015-01-252-6/+21
|
* ao/wasapi: remove unnecessary check of audio thread inputKevin Mitchell2015-01-251-2/+0
| | | | it would have caused a deadlock if it fired anyway.
* ao/wasapi: more consistent/reliable method of computing extra ↵Kevin Mitchell2015-01-251-2/+1
| | | | WAVEFORMATEXTENSIBLE size
* ao/wasapi: more missed cleanup on failureKevin Mitchell2015-01-251-3/+5
|
* ao/wasapi: check return valuesKevin Mitchell2015-01-251-3/+6
| | | | | Only issue a warning for failure of wasapi_enumerate_devices and wasapi_fill_VistaBlob.
* ao/wasapi: make functions return bool that were acting like itKevin Mitchell2015-01-252-37/+37
| | | | | | | this involved inverting the logic of find_formats, enumerate_devies and wasapi_fill_VistaBlob. The latter two were trivial as their return values were not actually checked (to be fixed in a later commit).
* ao/wasapi: check full GUID of KSDATAFORMAT to determine floatKevin Mitchell2015-01-252-8/+9
|
* ao/wasapi: expose GUID and PKEY convenience functionsKevin Mitchell2015-01-253-45/+49
| | | | Give them the prefix mp_ and make them nonstatic.
* ao/wasapi: remove unused variableKevin Mitchell2015-01-251-3/+0
|
* ao/wasapi: safely define PKEY constantsKevin Mitchell2015-01-251-16/+13
| | | | | | | | | Before these definitions were incorrectly guarded by and #ifdef but since they aren't macros, this would never be true so that if they were ever added to mingw headers we would have problems. rename KSDATAFORMAT constants with the same mp prefix for consistency. also use DEFINE_GUID rather than defining the bare structure
* ao/wasapi: avoid redundant passing of ao and wasapi_state as argumentsKevin Mitchell2015-01-251-19/+19
| | | | also drop some useless const declaraitons
* ao/wasapi: just return 0 unconditionally from the threadKevin Mitchell2015-01-251-10/+4
| | | | | We weren't actually checking this value anyway. We only really cared about init failure, which was checked another way.
* ao/wasapi: fix unmatched CoUninitialize() on init failureKevin Mitchell2015-01-252-8/+5
|
* ao/wasapi: more debugging messagesKevin Mitchell2015-01-252-14/+27
|
* ao/wasapi: simplify the init retryKevin Mitchell2015-01-251-10/+8
|
* ao/wasapi: make get_device_delay return an error codeKevin Mitchell2015-01-251-12/+21
|
* ao_wasapi: don't treat SetDisplayName() failure as fatalwm42015-01-251-1/+2
| | | | Same for SetIconPath().
* demux_playlist: detect headerless m3u files by extensionwm42015-01-251-1/+24
| | | | | | | | | | | | | | | m3u files are normally just text files with a list of filenames. Nothing actually mandates that there is a header. Until now, we've rejected such files, because there's absolutely no way to detect them. If nothing else claims the file, the extension is ".m3u", and if the contents of the file look like text, then load it as m3u playlist. The text heuristic is pretty cheap, but at least it should prevent trying to load binary data as playlist. (Which would "work", but result in a catastrophic user experience.) Due to the text heuristic, UTF-16/32 files will be rejected (unless they have a header), but I don't care.
* ytdl_hook: Check for empty playlistsChrisK22015-01-251-1/+7
| | | | | Sometimes we get empty playlists back, print a warning message instead of crash
* subprocess-win: Always quote argv[0]James Ross-Gowan2015-01-251-3/+5
| | | | | | | | | | | | | If the program name isn't quoted and the .exe it refers to isn't found, CreateProcess will add the program arguments to the program name and continue searching, so for "program arg1 arg2", CreateProcess would try "program.exe", "program arg1.exe", then "program arg1 arg2.exe". This behaviour is weird and not really desirable, so prevent it by always quoting the program name. When quoting argv[0], escape sequences shouldn't be used. msvcrt, .NET and CommandLineToArgvW all treat argv[0] literally and end it on the trailing quote, without processing escape sequences.
* player: respect --untimed on last framewm42015-01-252-3/+4
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* player: respect --untimed on video format changeswm42015-01-251-1/+1
| | | | | | | | | | | If the video format changes (e.g. different frame size), a special code path is entered to wait until the currently displayed frame is done. Otherwise, the frame before the change would be destroyed by the vo_reconfig() call. This code path didn't respect --untimed; correct this. Fixes #1475.
* player: don't fall asleep on audio decoding errorswm42015-01-251-0/+2
| | | | | | This makes it retry later. Fixes #1474.
* player: fix --stop-playback-on-init-failure on audio init failurewm42015-01-251-2/+1
| | | | | | | This was forgotten when the option was implemented, and makes this option work as advertised. Fixes #1473 (though the default behavior is probably still stupid).
* image_writer: check for conversion errorswm42015-01-253-11/+17
| | | | | This can happen when e.g. a VO returns a screenshot in an unsupported format.
* cache: cache-position needs to be int64_tOliver Freyermuth2015-01-251-1/+1
| | | | | | Both max_filepos and offset are int64_t, so pos can overflow, e.g. causing endless loops in stream implementation.
* x11: always use glXGetProcAddressARB()wm42015-01-251-1/+1
| | | | | | | | | | glXGetProcAddress() is outdated, and as far as I know doesn't give all the guarantees the "new" ARB function gives. Probably doesn't matter too much, because until now it always appeared to work. On the other hand, since this function is (bogusly) used only on the gl3 code path, it could have happened that users hit this, and just reverted to vo_opengl_old instead.
* video/out/win_state.c: fix --monitoraspectSoeren D. Schulze2015-01-251-1/+1
|
* manpage: document details of option quoting and escapingwm42015-01-251-4/+56
| | | | | Makes me realize what a mess this is. I hope it can be simplified in the far future, preferably by killing the suboption parser completely.
* x11: make display-names property stricterwm42015-01-251-1/+3
| | | | | | | | | | | | | | Returning the property before the window is mapped could lead to confusing behavior, and in particular strange differences between vo_vdpau and vo_opengl. (vo_opengl creates the window right at the start, while vdpau waits until the first reconfigure event.) It might even be possible that for vo_opengl random results were returned, because the hidden window can have different placement than the actual, final one on initial video reconfig. Fix this by returning the property only if the window is considered mapped. command.c handles this case specifically, and makes the property unavailable, instead of returning an empty list.
* af_volume: dump applied replaygain in verbose modewm42015-01-251-1/+5
|
* manpage: talk about one script, not multiple scriptsRyan Jacobs2015-01-251-2/+2
| | | | | | There aren't multiple scripts. We're just talking about one: youtube-dl. Signed-off-by: wm4 <wm4@nowhere>
* command: make empty vf-metadata not an errorwm42015-01-252-14/+10
| | | | | | | | If a filter exists, but has no metadata, just return success. This allows the user to distinguish between no metadata available, and filter not inserted. See #1408.
* vf: fix crash if filter doesn't provide control entrypointwm42015-01-251-1/+1
| | | | | | | | This input command crashed: vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}" Fixes #1408.
* options: expand ~ for the include optionStefano Pigozzi2015-01-251-1/+5
| | | | Fixes #1406
* player: make --shuffle/--merge-files affect runtime loaded playlistswm42015-01-255-19/+26
| | | | | | | Until now, these options took effect only at program start. This could be confusing when e.g. doing "mpv list.m3u --shuffle". Make them always take effect when a playlist is loaded either via a playlist file, or with the "loadlist" command.
* sub: reset sub decoder correctly when cycling subtitleswm42015-01-251-3/+1
| | | | | | | | | | reset_subtitles() works in mpctx->d_sub[], which is set to NULL before calling it from uninit_sub(). This fixes resetting the subtitle when cycling subtitle tracks. Actually, this was probably a feature, because it's annoying if subtitles don't show up when cycling them. But it also can have unintended consequences, so get rid of it.
* vo_opengl, x11: make legacy context warning not an errorwm42015-01-251-1/+1
| | | | | | Really, this doesn't actually matter. It's printed as error only because it was once thought to be an mostly unneeded fallback, but it turned out this is still frequently needed, and users are getting confused.
* vo_opengl: fix broken rejection of extended scalingwm42015-01-251-3/+2
| | | | | Possibly explains why some users got mysterious FBO errors on crappy hardware.
* lua: don't ignore key press events for script key bindingswm42015-01-251-2/+2
| | | | Meh.
* m_option: never return NOPTS value as number from propertieswm42015-01-251-5/+36
| | | | | | | | MP_NOPTS_VALUE (basically INT64_MIN) is basically an special timestamp value that means "unset" or "unknown". Its exact value is internal, and should never be returned or interpreted by any API. So return "no" instead (what is also what the parser accepts).
* client API: fix log buffer overflow casewm42015-01-251-3/+3
| | | | | | | It just crashed. The prefix and text fields point to static strings in this case. Oops. Fixes the issue mentioned in #838.
* mp_image: reject invalid display aspect ratiowm42015-01-251-1/+1
| | | | | | | | | | Having any of these set to 0 makes no sense. I think some code might still be using 0/0 aspect ratio to signal unset aspect ratio, but I didn't find it. If there is still code like this, it should be fixed instead. Fixes #1467.
* player: fix crash wtih --secondary-sidwm42015-01-251-2/+3
| | | | Fises #1463.
* bstr: fix possible undefined behavior with length 0 stringswm42015-01-251-1/+1
| | | | | | | | | | BSTR_P() passes the string length and start pointer to printf-like functions. If the lenfth is 0, the pointer can be NULL, but we're actually still not allowed to pass a NULL pointer in any case. This is mostly a technically, because nobody in their right mind would attempt to specifically break such cases. But it's still undefined behavior, and some libcs might be strict about this.
* player: don't set tag strings to NULLwm42015-01-251-3/+3
| | | | | | | | | | | | | bstr is a bounded string type, consisting of a pointer and a length value. If the length is 0, the pointer can be NULL. This is somewhat logical due to how this abstraction works, but it can leak when converting to C strings. talloc_strndup() returns NULL instead of "" in this case, which broke some other code. Use bstrto0() instead, which is the "proper" function to convert bstr to char*. Fixes #1462.
* demux_mkv: fix EBML parsing checkswm42015-01-251-16/+15
| | | | | | | | Reading IDs must be checked too. This was basically forgotten in commit f3a978cd. Also set the *length parameter for ebml_parse_length() in some error cases, which _really_ should happen. Fixes #1461.
* tl_matroska: fix minor memory leak in error casewm42015-01-251-5/+7
| | | | Going the way of least resistance. Fixes #1460.
* player: check sufficient track selection before destroying VOwm42015-01-251-9/+9
| | | | | | | | | | | | | | | | mpv needs at least an audio or video track to play something. If the track selection is basically insufficient, the player will immediately skip to the next file (or quit). One slightly annoying thing might be that trying to play a subtitle file will close the VO window, and then go to the next file immediately (so "mpv 1.mkv 2.srt 3.mkv" would flash the video window when 2.srt is skipped). Move the check to before the video window is possibly closed. This is a minor cosmetic issue; one can use --force-window to avoid closing the video window at all. Fixes #1459.
* demux_mkv: better check for some EBML parsingwm42015-01-251-12/+18
| | | | | | | | | | Apparently, originally this code was meant to be able to read past the buffer somewhat, which is why the buffer allocation was padded by 8 byte. This is unclean and confuses valgrind. This probably could have crashed with certain invalid files too. Also revert the change added with 10a2f69; it should be not needed anymore.
* demux_mkv: avoid endless loop with broken fileswm42015-01-251-1/+1
| | | | Fixes #1457.
* ao_pulse: exit AO if stream failswm42015-01-251-1/+5
| | | | | | This can for example reproduced by killing the pulseaudio server. If this happens, just try to reload the AO, instead of breaking everything forever.
* demux_mkv: improve robustness against broken libavcodec parserswm42015-01-251-2/+2
| | | | | | | | | The VP9 codec parser has a bug: it doesn't set the data/size pointers passed to it. As I understand, it must always do this, and in fact, if it doesn't some libavcodec generic code would be in trouble too. This helps with #1448, but is not the full fix for it. The codec parser must be fixed in libavcodec itself.
* ao: remove coreaudio_exclusive from autoprobing listwm42015-01-251-2/+2
| | | | Apparently this was a mistake.
* gl_video.c: invalidate image_params in uninit_video()xylosper2015-01-251-0/+4
| | | | | | | | | | | | | When the given mp_image_params does not match with that of gl_video, gl_video_config() always calls uninit_video() but calls init_video() only if valid format is given. Since uninit_video() does not change image_params of gl_video, when the same params as the previous one is given to gl_video_config() after gl_video is unitialized with invalid format, gl_video_config() never calls init_video(). To prevent this, invalidate image_params of gl_video in uninit_video().
* dxva2: copy mp_image attributes to sw_imgJames Ross-Gowan2015-01-251-0/+1
|
* mp_image: copy missing attributesJames Ross-Gowan2015-01-251-0/+2
| | | | | This adds a couple of missing fields to mp_image_copy_attributes so things like rotation metadata work.
* video: fix timeline with some container formatswm42015-01-251-0/+2
| | | | | | Using edl or --merge-files with .avi files didn't work, because the DTS was not offset. Only the PTS was adjusted, which led to nonsense timestamps.
* sd_lavc: apply fallback to video resolution only for vobsubswm42015-01-251-14/+11
| | | | | | | | | | | | | | | | | | Commit 87c13de6 added a fallback to video resolution if the subtitle resolution is unknown. Apparently this fixed some broken files with vobsubs. This broke some DVB subtitles. Apparently .ts captures with 1920x1080 video resolution and 720x576 subtitles do exist. The sample at hand had some streams with 720x576 resolution and no sub resolution set, and some streams with 1920x1080 resolution and sub resolution set (both against the same 1920x1080 video). My conclusion is that 720x576 is the only reasonable fallback for DVB (but I can't be sure). The fallback is removed for PGS too. I don't know about the PGS case; it seems the sub resolution must always be set, so it shouldn't matter. Fixes #1425.
* options: don't cut off long options in --list-optionswm42015-01-251-1/+1
| | | | | | | This was by design, so that overly long options don't mess up the column layout, but I guess it doesn't have much worth. Fixes #1426.
* manpage: fix --video-unscaled descriptionwm42015-01-251-3/+2
| | | | This was changed a long time ago in commit 37319ab6.
* ytdl: silence "succeeded" messagewm42015-01-251-1/+1
| | | | Pretty useless by now.
* cocoa: fix build on 10.9Stefano Pigozzi2015-01-251-1/+1
| | | | Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
* cocoa: fix NSMapGet errorStefano Pigozzi2015-01-251-2/+4
| | | | regression from 64b6b2ea45
* manpage: fix typowm42015-01-251-1/+1
|
* cocoa: fix uninitialization while in fullscreenStefano Pigozzi2015-01-253-2/+36
| | | | |