summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.3.4v0.3.4wm42014-01-311-1/+1
|
* vo_wayland: silence shadowing warningwm42014-01-311-3/+3
| | | | No real problem.
* quvi: disable subtitle fetching by defaultwm42014-01-312-5/+7
| | | | This is slow and unreliable, basically unusable.
* quvi: add option to not fetch subtitlesAndre D2014-01-314-1/+11
| | | | Signed-off-by: wm4 <wm4@nowhere>
* demux_lavf: fix crash with empty fileswm42014-01-311-1/+1
| | | | | | | | | | This used to work; I'm not sure when or why it regressed. When setting AVProbeData.filename to NULL, libavformat will crash in rtp_probe() by unconditionally accessing the string. We used to set the filename to NULL to prevent probing by file extension when we don't deem it as necessary. Using an empty string also works for this purpose.
* mp_image: reject too large image sizeswm42014-01-311-0/+4
| | | | | | | | | | | Larger sizes can introduce overflows, depending on the image format. In the worst case, something larger than 16000x16000 with 8 bytes per pixel will overflow 31 bits. Maybe there should be a proper failure path instead of a hard crash, but not yet. I imagine anything that sets a higher image size than a known working size should be forced to call a function to check the size (much like in ffmpeg/libavutil).
* sd_lavc: skip 0 sized sub-bitmapswm42014-01-311-2/+4
| | | | | | | Not everything in the OSD path handles 0x0 sized sub-bitmaps well. At least the code implementing --sub-gray had severe problems with it. Fix this by skipping such bitmaps.
* wayland/shm: RGB888 as default, change optionsAlexander Preisinger2014-01-311-15/+27
| | | | | | RGB565 is one of the fastest and most supported formats on low end consumer devices, but ffmpeg spams warning when using it. Make it opt-in instead of opt-out.
* wayland/shm: fix memory leakAlexander Preisinger2014-01-311-1/+4
|
* wayland/shm: remove resize boilerplateAlexander Preisinger2014-01-311-21/+4
| | | | | | The problem seems to have solved itself. I guess the previous changes to resizing and commit ba101ab made this possible. Consider me happy for removing that crap.
* w32: use safe DLL search paths everywhereJames Ross-Gowan2014-01-312-17/+21
| | | | | | | | | | | | Windows applications that use LoadLibrary are vulnerable to DLL preloading attacks if a malicious DLL with the same name as a system DLL is placed in the current directory. mpv had some code to avoid this in ao_wasapi.c. This commit just moves it to main.c, since there's no reason it can't be used process-wide. This change can affect how plugins are loaded in AviSynth, but it shouldn't be a problem since MPC-HC also does this and it's a very popular AviSynth client.
* w32: enable heap corruption detectionJames Ross-Gowan2014-01-311-0/+3
| | | | | | | | | | Enable the terminate-on-corruption feature. This is recommended for new Windows applications and shouldn't cause a performance hit. It actually shouldn't change anything for 64-bit builds, since Win64 has this switched on by default. See: http://blogs.msdn.com/b/michael_howard/archive/2008/02/18/faq-about-heapsetinformation-in-windows-vista-and-heap-based-buffer-overruns.aspx
* w32: don't disable the error reporting dialogJames Ross-Gowan2014-01-311-1/+1
| | | | | | Windows users expect this when a program crashes. Without it, the program just disappears. Also change the SetErrorMode call to use macros instead of a hardcoded constant.
* sub: fix crash with certain uses of --vf=subwm42014-01-313-32/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If, for some reason, the subtitle renderer attempts to render a subtitle before SD_CTRL_SET_VIDEO_PARAMS was called, it passed a value calculated from invalid values. This can happen with --vf=sub and --start. The crash happens if 1. there was a subtitle packet that falls into the timestamp of the rendered video frame, 2. the playloop hasn't informed the subtitle decoder about the video resolution yet (normally unneeded, because that is used for weird corner cases only, so this code is a bit fuzzy), and 3. something actually requests a frame to be drawn from the subtitle renderer, like with vf_sub. The actual crash was due to passing NaN as pixel aspect to libass, which then created glyphs with ridiculous sizes, involving a few integer overflows and unchecked mallocs. The sd_lavc.c and sd_spu.c cases probably don't crash, but I'm not sure, and it's better fix them anyway. Not bothering with sd_spu.c, this crap is for compatibility and will be removed soon. Note that this would have been no problem, had the code checked whether SD_CTRL_SET_VIDEO_PARAMS was actually called. This commit adds such a check (although it basically checks after using the parameters). Regression since 49caa0a7 and 633fde4a.
* demux_lavf: add hack to workaround too unreliable mp3 detectionwm42014-01-311-0/+2
| | | | | | | | | | | This generally affects mp3 files that don't have any (or many) mp3 frames in the first 2 MB. 2 MB is the maximum probe size, and libavformat returns a low probescore even if we give it the full 2 MB. Trying to probe a larger buffer (or even the full file) doesn't work for mysterious reasons. The workaround consists in accepting a very weak probescore if the format is detected as mp3 and we probed already 2 MB.
* demux_lavf: refactor format probing hackwm42014-01-311-26/+24
| | | | | | Restructure it a bit, so we can use the format hack list even if no mime type applies. Shouldn't change anything functionally yet. Preparation for the next commit.
* vo_wayland: fix confusion of video and window sizeswm42014-01-311-2/+2
|
* stream_pvr: Fix fd check, -1 indicates invalid, not 0.reimar2014-01-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36677 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: fix balance controlwm42014-01-311-2/+2
| | | | | | | | Balance controls as used by mixer.c was broken, because af_pan.c stopped accepting its arguments. We have to allow 0 channels explicitly. Also, fix null pointer access if the matrix parameter is not used. Regression from commit 82983970.
* waf: try to fix unicode/byte string messupwm42014-01-311-1/+1
| | | | | | | Some mpv builds identify with e.g. "mpv b'0.3.3' ". The version looks like str() was called on a Python byte string. I couldn't reproduce it on my machine (I tried with both Python 2 and 3), so I'm not exactly sure what's going on here, but I'm hoping this commit does fix it.
* manpage: fix af_equalizer syntaxwm42014-01-311-1/+1
| | | | This doesn't need quoting, for some reason.
* af: fixed out-of-bounds accesses caused by NUM_FMT and co.11rcombs2014-01-311-18/+18
| | | | | | | | | Signed-off-by: wm4 <wm4@nowhere> This merges pull request #496. The problem was that at least the initialization of the distance[] array accessed af_fmtstr_table[] entries that were out of bounds. Small cosmetic changes applied to the original pull request.
* cookies.c: cols must (and does) have 7 elements.reimar2014-01-311-1/+1
| | | | | | | Doesn't affect the generated code, but avoids confusion in both humans and newer Coverity versions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36623 b3059339-0415-0410-9bf9-f77b7e298cf2
* vcd_read: Fix sizeof argument.reimar2014-01-311-1/+1
| | | | | | | | | The struct we need to copy is actually a cdrom_msf0, not cdrom_msf. Even though the kernel for no good reason reads it in as a cdrom_msf struct, but only uses the part shared with cdrom_msf0 - this is probably a kernel bug. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36622 b3059339-0415-0410-9bf9-f77b7e298cf2
* mkv.desktop: add two more mime typeswm42014-01-311-1/+1
| | | | Stolen from github issue #484. No idea whether they're needed.
* cache: remove debug codewm42014-01-311-1/+0
| | | | | | This was accidentally committed. <rcombs> `mp_sleep_us(100000);` <-- are you drunk?
* cache: reduce message spamwm42014-01-311-7/+16
| | | | Output only 1 message every 5 seconds at most.
* Release 0.3.3v0.3.3wm42014-01-151-1/+1
|
* Detect Lua on FreeBSDGrzegorz Blach2014-01-152-1/+3
|
* player: avoid stalling when starting a network streamwm42014-01-153-2/+9
| | | | | | | | | | | | Starting a network stream could stall by executing uncacheable stream control requests (STREAM_CTRL_GET_LANG and STREAM_CTRL_GET_DVD_INFO). Being uncacheable means the player has to wait until the cache is done reading the current block of data. These requests can't be cached because they're too complicated, so the only way to avoid them is special casing the DVD and Bluray streams (which are the only things which need these requests), and not doing them in other cases. (This is kind of inelegant, but so is the rest of the DVD/BD code.)
* demux_mkv: improve robustness by explicitly checking for level 1 elementswm42014-01-153-46/+50
| | | | | | | | | | | | | | | | | | | | Matroska makes it pretty hard to resync correctly on broken files: random data returns "valid" EBML IDs with a high probability, and when trying to skip them it's likely that you skip a random amount of data (instead of considering the element length invalid). Improve upon this by skipping known level 1 elements only. Consider everything else invalid and call the resync code. This might result in annoying behavior when Matroska adds new level 1 elements, although it won't be particularly harmful. Matroska doesn't really allow us to do better (even mkvtoolnix explicitly checks for known level 1 elements). Since we now don't always want to combine EBML element skipping and resyncing, remove ebml_read_skip_or_resync_cluster(), and make ebml_read_skip() more tolerant against skipping broken elements. Also, don't resync when reading sub-elements, and instead do resyncing when reading them results in an error.
* demux_mkv: avoid skipping too much data in corrupted fileswm42014-01-153-14/+18
| | | | | | | | | | Until now, corrupted files were detected if the size of an element (that should be skipped) was larger than the remaining file. This still could skip larger regions of the file itself if the broken size happened to be within the file. Change it so that it's never allowed to skip outside the parent's element.
* manpage: document --term-osd=forcewm42014-01-151-1/+3
| | | | | | | | Apparently this was forgotten when it was first added, or maybe it's an arrifact from the rst conversion. Conflicts: DOCS/man/en/options.rst
* player: don't block terminal OSD while seekingwm42014-01-151-3/+6
| | | | | | | | Seeking usually show the status on OSD. In terminal OSD mode, no status is shown, because there is already a separate status line. Unfortunately, the mechanism for showing the status was still active, which forced showing no message while the code for showing seek status was active.
* player: mention subtitles in av_desync_help_textwm42014-01-151-2/+2
| | | | | | | | Insane .ass subtitle scripts can cause severe slowdown (depending on the speed of the machine, or the insanity of the script), so mention how to test without subtitles. This is mainly to make the user aware that subtitle rendering can be a problem. For longwinded explanation, there isn't enough space.
* cocoa: fix window placement on secondary screensStefano Pigozzi2014-01-151-3/+2
| | | | | | | | | | | | | | For a long time the cocoa backend set the xinerama_x/y and used dx/dy from the VO instance. This somewhat worked with some workarounds but wasn't really what was supposed to be happening. Moreover 27e4360, which touched this workaround introduced a regression. New code doesn't set the xinerama_x/y values so that dx/dy are offsets in the current screen (not a virtual screen composed of all the screens). The screen reference detected during VOCTRL_UPDATE_SCREENINFO is also passed down to the window initialization code. Fixes #472
* cocoa: refactor init window positioning codeStefano Pigozzi2014-01-151-2/+1
|
* demux_lavf: add hack for MicroDVD for assuming frame based timingwm42014-01-151-0/+6
| | | | | | | | | | | MicroDVD files _can_ contain real timestamps instead of frame timestamps if they declare a FPS. But this seems to be rare, so ignore that if the FPS happens to match with the libavformat microdvd parser's default FPS. This might actually break files that declare 23.976 FPS, but the video file is not 23.976 FPS, but the chance that this happens is probably very low, and the commit fixes the more common breakage with 25 FPS video.
* sub: fix frame based subtitle timestamp handlingwm42014-01-151-1/+1
| | | | | | Subtitle formats with frame based timing require using the video FPS to compute proper subtitle timestamps. But it looks like the calculation to do that was inversed.
* wayland: properly empty output listAlexander Preisinger2014-01-151-4/+4
|
* wayland/shm: don't crash if initialization failedAlexander Preisinger2014-01-151-3/+1
|
* wayland: fix crash when initialization failswm42014-01-151-1/+2
| | | | | | On X11, if no wayland compositor is running, wl_list_init() will never be called. This will cause destroy_display() to segfault when trying to iterate over the list.
* wayland/shm: tone down warningsAlexander Preisinger2014-01-151-2/+2
| | | | Those warnings are printed far too often and actually aren't usefull at all.
* wayland: fix memory leaksAlexander Preisinger2014-01-153-2/+23
| | | | | | | | There are still some leaks from wayland-cursor stuff, but there is no way to free the memory as user of the cursor library. Conflicts: video/out/wayland_common.c
* player: fix setting smaller timeout on Windows systemswm42014-01-151-1/+1
| | | | | | | On Windows, we don't have proper input event wakeup handling, so we need to lower the playloop timeout in order to react fast to input. Closes #387.
* wayland: cleanup registry_handle_globalAlexander Preisinger2014-01-151-2/+1
| | | | | The wl_registry object is already passed as a parameter. No need to create a temporary variable.
* wayland: remove set_user_data from seat_listenerAlexander Preisinger2014-01-151-2/+0
| | | | | | | | | The user_data is passed on add_listener and can later be changed with set_user_data. But because we don't want to change it later and because it is the same object remove the set_user_data call. This might be a copy&paste leftover from the initial draft for the wayland backend.
* wayland: use static consistentlyAlexander Preisinger2014-01-151-4/+4
| | | | Declare everything that is only needed inside wayland_common.c as static.
* terminal: don't initialize termcap etc. if stdout is not a terminalwm42014-01-151-2/+6
| | | | | Otherwise, it seems one of the term* libraries will write escape sequences to stdout, for whatever reason.
* wayland: fix fullscreen & resizing for goodAlexander Preisinger2014-01-153-12/+34
| | | | | | | I added enough logic to never set ontop or fullscreen twitce. This commit keeps also the size of the video if multiple videos are played. If the ratio differs the width will be kept at the same size and only the height changes.
* manpage: mention how to get a list of codecs for use with --hwdec-codecswm42014-01-151-0/+3
|
* wayland: silence annoying libwayland-client messagewm42014-01-151-0/+3
| | | | | | | | | | | | | | | | | libwayland-client contains the following code [1]: runtime_dir = getenv("XDG_RUNTIME_DIR"); if (!runtime_dir) { fprintf(stderr, "error: XDG_RUNTIME_DIR not set in the environment.\n"); This means this message will unconditionally and unavoidably be printed if XDG_RUNTIME_DIR is not set. Since mpv is a terminal program, and we want to avoid unnecessary output, work it around by not attempting to use wayland if this environment variable is not set. [1] http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client.c#n636 (cd0dccd01e16fa404e03974d30ded3aebdb1c4bc)
* wayland: fix some memory leaks on initialization failurewm42014-01-151-6/+13
| | | | | | | | | | | This commonly happens when initializing vo_opengl on a X11-only system. Unfortunately, most wl_*_destroy() functions appear not to accept NULL pointers, making partial deinitialization a pain: you have to add your own NULL checks everywhere to avoid crashes. xkb.context is uninitialized separately, because you can initialize it just fine, even if the rest of input initialization fails.
* Release 0.3.2v0.3.2wm42014-01-061-1/+1
|
* cocoa: don't reset window size when the video size doesn't changeStefano Pigozzi2014-01-061-15/+14
| | | | Fixes #459
* w32_common: don't force topmost on fullscreenMartin Herkt2014-01-061-1/+2
| | | | Fixes #457, #444.
* Windows: use roaming AppData instead of localMartin Herkt2014-01-061-1/+1
| | | | Whatever. Fixes #458.
* build: don't depend on both libavresample and libswresamplewm42014-01-061-0/+1
| | | | | | When both libavresample and libswresample were detected, the script enabled both at the same time. This is not supported; although nothing bad happened apparently. Make the dependencies both mutually exclusive.
* player: always ise [statusline] for terminal OSDwm42014-01-061-3/+3
| | | | | | This was inconsistent: the actual statusline used [statusline] as message prefix, while other parts of the terminal OSD used [cplayer] (and MSGL_STATUS). This commit makes it consistent.
* player: print an error message if run command failswm42014-01-061-1/+5
| | | | | | | | | | | Note that we can't use mp_msg, because it's not async-signal safe (we might be running other threads while forking, so only functions specified to be async-signal safe can be called, and this doesn't include stdio; mp_msg acquires a mutex too). Also, always print a \n before running the program to flush the status line. The effect is that a program running successfully as well as the error message will effectively start on a new line.
* manpage: fix typowm42014-01-061-1/+1
|
* player: don't select subtitles added from quvi by defaultwm42014-01-062-5/+10
| | | | | | | | | | Quvi subtitles are considered external subtitles (simply because they're separate from the audio/video stream), but for the sake of subtitle auto-selection, they should not be considered external. Change this so that quvi subtitles are treated like muxed subtitles (with default flag never set). This means subtitles won't be selected by default, unless explicitly requested with --sid or --slang.
* Revert "wayland/egl: use redraw callback"Alexander Preisinger2014-01-062-28/+1
| | | | | | | | | | | Because of this commit there were problems displaying the frmase in their right order. This reverts commit 96e75d234a4df1a09f38eaf932d00d79dccdc324. Conflicts: video/out/gl_wayland.c video/out/wayland_common.h
* wayland: remove workaroundAlexander Preisinger2014-01-061-6/+3
| | | | | | | | The changes in the vo_wayland_ontop function have no effect on the workaround. Somehow the problem just disappeared. I guess it is because of the new control function in gl_wayland.c where the resize happens immediatly after the event dispatch/flush.
* demux_subreader: reject file if not opened by --subwm42014-01-063-0/+5
| | | | | | | demux_subreader.c contains the old MPlayer subtitle parser, and I have absolutely no confidence in this (very crappy) code. There might be one or two security risks associated with running that code on arbitrary input.
* wayland/egl: misc fixes and cleanupsAlexander Preisinger2014-01-062-6/+1
|
* wayland/egl: use redraw callbackAlexander Preisinger2014-01-062-1/+32
| |