summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.3.5v0.3.5wm42014-02-121-1/+1
|
* vo_opengl: make :srgb decompand the BT.709 values correctlynand2014-02-121-2/+15
| | | | | | | | This is the same issue as addressed by 257d9f1, except this time for the :srgb option as well. (257d9f1 only addressed :icc-profile) The conditions of the srgb_compand mix() call are also flipped to prevent an off-by-one error.
* command: fix metadata propertywm42014-02-121-2/+2
| | | | This crashed when retrieving the raw property value. Oops.
* wayland/shm: prevent the window from flying awayAlexander Preisinger2014-02-121-0/+2
| | | | With the new xdg_shell the problem will be no gone by itself.
* manpage: document --aspect special valueswm42014-02-121-0/+7
| | | | | | | Use of these is "discouraged", but they're there to select these special cases with the "aspect" property. They really should use some sort of choice option type, but since it would be some work to make these work with float values, the simple and dumb alternative was picked.
* video: fix --no-aspectwm42014-02-121-2/+2
| | | | This also affects the --aspect option and the "aspect" property.
* vo_opengl: fix typo in gamma function's parameternand2014-02-121-2/+2
| | | | | The correct value is 0.081, not 0.18. The scale factor also needed slight adjustment due to the order of operations.
* vo_vdpau: Discard zero timestampsJonas Zetterberg2014-02-121-0/+3
| | | | Some drivers do not supply timestamps, use old timestamp in these conditions.
* vo_vdpau: Ensure presentation time is within boundsJonas Zetterberg2014-02-121-0/+4
| | | | | When a time sync happens the last sync time is the minimum time that can be used for presentation.
* demux: fix some newlines in output messageswm42014-02-121-2/+2
|
* player: fix an assert when reinitializing audio in some caseswm42014-02-121-0/+3
| | | | | | | | This sometimes happened when changing playback speed (= reinitializing audio) after seeking of playback start. The assertion in audio.c:441 was triggered, because buffer_playable_samples wasn't reset correctly when the audio buffer was cleared or shortened. The assertion is correct and should hold up any time.
* vo_opengl: use exactly the values defined by BT.709 for CMSnand2014-02-121-3/+9
| | | | | | I could not see any difference whatsoever, but for usage with a 3DLUT there's zero performance difference so we might as well follow the spec to the letter.
* gl_x11: don't require a X visual for modern GL context creationwm42014-02-121-4/+10
| | | | | | | | Legacy GL context creation (glXCreateContext) explicitly requires a X visual, while the modern one (glXCreateContextAttribsARB) does not for some reason. So fail only on the legacy code path if we don't find a visual. Note that vo_x11_config_vo_window() will select a default visual if a NULL visual is passed to it.
* gl_x11: always request true color visualwm42014-02-121-0/+1
| | | | | | | | | | | | | | | | | | This fixes issue #504. For some reason, glXChooseFBConfig() will return a fbconfig with no associated visual. (I'm not sure if this allowed. They don't always have a visual, but since GLX_X_RENDERABLE is set and GLX_DRAWABLE_TYPE is (implicitly) set to GLX_WINDOW_BIT, why would there be no visual?) Even worse, a test program seems to show that a 16 bit fbconfig is selected (instead of 24/32 bit), which doesn't sound nice at all. Since there _are_ better fbconfigs available, glXChooseFBConfig() should normally sort them by quality, and return the better ones first. It's worth noting that this function should also prefer GLX_TRUE_COLOR over anything else, although this comes last in the sort order. Whatever is going on, requesting GLX_X_VISUAL_TYPE with GLX_TRUE_COLOR seems to fix it.
* umpv: silence mpv terminal outputwm42014-02-121-2/+4
| | | | | Now it does basically the same as mkv.desktop. Explanation is included in the description comment.
* umpv: improve descriptionwm42014-02-121-9/+11
|
* umpv: use --force-windowwm42014-02-121-4/+2
| | | | This makes it show a window even when playing audio-only files.
* audio: fix signedness of AF_FORMAT_S32Pwm42014-02-121-1/+1
| | | | This was marked as unsigned, but it's signed. Found by xylosper.
* mf: don't limit filename length with PATH_MAXwm42014-02-121-3/+3
| | | | | | | | Use an arbitrary constant instead, which is as good as PATH_MAX. This helps us to avoid having to think about pull request #523. Also fix a case where a potentially signed char was passed to isspace().
* player: refresh OSD on track switchingwm42014-02-121-0/+2
| | | | Apparently, at least sub_reload was missing a refresh at all.
* wayland: change minimum versionAlexander Preisinger2014-02-122-11/+2
| | | | | Change minimum version to 1.3 and remove the version checking in the source code.
* x11: fix initial VO sizewm42014-02-121-6/+7
| | | | | | | | | | This was done incorrectly in the previous commit: the fallback size used the window size as requested with the first config call, which is the size of the hidden window in the vo_opengl case. (That damn hidden window again...) Conflicts: video/out/x11_common.c
* x11: remove apparently useless codewm42014-02-121-8/+0
| | | | | | | | | This code essentially does nothing. As far as I could find out, this actually used to do something. Then it was removed with commit efe7c39f, leaving some leftover code that didn't do anything useful. This happened 12 years ago! Also remove a commented debug printf.
* x11: fix race condition when setting aspect when leaving fullscreenwm42014-02-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_opengl creates a hidden X11 window to probe the OpenGL context. It must do that before creating a visible window, because VO creation and VO config are separate phases. There's a race condition involving the hidden window: when starting with --fs, and then leaving fullscreen, the unfullscreened window is sometimes set to the aspect ratio of the hidden window. I'm not sure why the window size itself uses the correct size (but corrupted by the wrong aspect), but that's perhaps because the window manager is free to ignore the size hint while honoring the aspect, or something equally messed up. It turns out this happens because x11_common.c thinks the size of the hidden window is the size of the unfullscreened window. This in turn happens because vo_x11_update_geometry() reads the size of the hidden window when called in vo_x11_fullscreen() (called from vo_x11_config_vo_window()) when mapping the fullscreen window. At that point, the window could be mapped, but not necessarily. If it's not mapped, it will get the size of the unfullscreened window... I think. One could fix this by actively waiting until the window is mapped. Try to pick a less hacky approach instead, and never read the window size until MapNotify is received. vo_x11_create_window() needs a hack, because we'd possibly set the VO's size to 0, resulting e.g. in vdpau to fail initialization. (It'll print error messages until a proper resize is received.) Conflicts: video/out/x11_common.c
* old-configure: use -std=c99wm42014-02-121-2/+2
| | | | See previous commit.
* build: switch to -std=c99 for saner float semanticswm42014-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a weird bug with aspect ratio handling. It has to do with float handling: with -std=gnu99, gcc implicitly enables broken non- standard semantics giving float variables excess precision. This can for example make this fail in theory: "float a = 0.1; assert(a == a);" While standard C allows excess precision _within_ expressions, it requires truncation when storing float values in variables of types "float" or "double". The "gnu99" mode breaks this. It can be unbroken by using "c99", or by specifying -fexcess-precision=standard. The former seems less likely to break compilers other than modern gcc. Note that -ffloat-store would also fix this, but also makes float expressions less efficient and less precise for no reason. The code that mistakenly fails because of this is dec_video.c line 393. It caused the container aspect to be ignored in some or all situations, depending how the compiler optimizes. For example, on gcc-4.6 with -Os, the aspect is always ignored. In future, we should probably just get rid of storing aspects as floats. Note: requires mingw-w64 trunk for math.h fixes (M_PI was hidden).
* cache: refuse to seek outside of cache boundarieswm42014-02-121-4/+18
| | | | | | | | | | | | | | | | | Note that this still happens in the stream level, so we can't have nice highlevel behavior restricting seeking. Instead, if a seek leads to the demuxer requesting data outside of the cached range, the seek will simply fail. This might confuse the demuxer, and the resulting behavior is not necessarily useful. Note that this also doesn't try to skip data on a forward seek. This would just freeze the stream with slow unseekable streams. One nice thing is that stream.h has a separate function for merely skipping data (separate from seeking forward), which is pretty useful in this case: we want skipping of data to work, even if we reject seeking forward by skipping data as too expensive. This probably is or will be useful for demux_mkv.c.
* 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
| | | |