summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.3.6v0.3.6wm42014-03-111-1/+1
|
* Revert "player: simplify audio reset when seeking"wm42014-03-111-10/+15
| | | | | | | | | | | This reverts commit 75dd3ec2106701cb865f52966de66c51cb6f9204. This broke seeking with ordered chapters in some situations. While the reverted commit was perfectly fine for playback of normal files, it overlooked that in the ordered chapters case switching segments actually reinitialized the audio chain completely, including the decoder. And decoders still read packets on initialization. We can restore the original commit as soon as decoders stop doing this.
* ao_alsa: fix return value for volume operations with spdifwm42014-03-111-1/+1
| | | | | | | | | | | This AO pretended to support volume operations when in spdif passthrough mode, but actually did nothing. This is wrong: at least the GET operations must write their argument. Signal that volume is unsupported instead. This was probably a hack to prevent insertion of volume filters or so, but it didn't work anyway, while recovering after failed volume filter insertion does work, so this is not needed at all.
* ao_alsa: check ALSA PCM state before pause and resumefoo862014-03-111-5/+9
| | | | | | | | | | It is possible to have ao->reset() called between ao->pause() and ao->resume() when seeking during the pause. If the underlying PCM supports pausing, resuming an already reset PCM will produce an error. Avoid that by explicitly checking PCM state before calling snd_pcm_pause(). Signed-off-by: wm4 <wm4@nowhere>
* ao_rsound: pass correct data type to rsd_set_param()Hans-Kristian Arntzen2014-03-111-2/+2
| | | | Signed-off-by: wm4 <wm4@nowhere>
* build: fix compilation with MinGW-w64Hans-Kristian Arntzen2014-03-111-2/+14
| | | | | | References to WinMM/OLE/UUID were missing. Signed-off-by: wm4 <wm4@nowhere>
* lua: add license headerwm42014-03-111-0/+17
| | | | Oops.
* ao_jack: fix termination on the end of filewm42014-03-111-3/+19
| | | | | | | | | | | | | | | | | | | | The player didn't quit when the end of a file was reached. The reason for this is that jack reported a constant audio delay even when all audio was done playing. Whether that was recognized as EOF by the player depended whether the exact value was higher or lower than the player's threshhold for what it considers no more audio. get_delay() should return amount of time it takes until the last sample written to the audio buffer reaches the speaker. Therefore, we have to track the estimated time when the last sample is done, and subtract it from the calculated latency. Basically, the latency is the only amount of time left in the delay, and it should go towards 0 as audio reaches ths speakers. I'm not sure if this is correct, but at least it solves the problem. One suspicious thing is that we use system time to estimate the end of the audio time. Maybe using jack_frame_time() would be more correct. But apart from this, there doesn't seem to be a better way to handle this.
* build: update wafwm42014-03-111-2/+2
| | | | <lachs0r> it fixes issues with recent python3
* command: fix null pointer dereference in idle modewm42014-03-111-2/+2
| | | | Pressing 'h' in idle mode -> crash.
* vdpau: change the error message when video too largeAndrey Morozov2014-03-111-1/+2
|
* example.conf: change subtitle codepage example to use UTF-8 fallbackwm42014-03-111-1/+2
| | | | This should be pretty safe compared to forcing the codepage.
* example.conf: subtitle encodingYaser Alraddadi2014-03-111-0/+3
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Closes #580.
* manpage: fix yadif example in one casewm42014-03-111-1/+1
|
* input: check for abort cmd in multi-commandswm42014-03-115-10/+20
| | | | | | | | | MP_CMD_COMMAND_LIST commands (used to implement key bindings with multiple commands) were not checked for abort commands. Implement it. Remove the remarks about multi-commands being special from the manpage. Seek coalescing is handled differently now, and the issue with abort commands is fixed with this commit.
* input: ignore modifiers when releasing keysJames Ross-Gowan2014-03-111-2/+2
| | | | | This prevents keys from getting stuck if the modifier is released before the base key.
* video: add rounding to aspect ratio calculationswm42014-03-111-2/+2
| | | | | Small errors are unavoidable, but truncation can cause anamorphic video to be off by 1 or 2 pixels.
* player: fix start time if timeline is used (ordered chapters, EDL)wm42014-03-111-6/+5
| | | | | | | | | When timeline was used, and the --start option was not used, the initial seek (needed to switch to the first timeline segment) seeked to -1 due to an oversight. Conflicts: player/loadfile.c
* edl: fix offset of user-visible chapterswm42014-03-111-1/+1
| | | | | Basically, chapter marks and chapter seek-points were incorrect, while the rest worked.
* w32_common: don't set small iconJames Ross-Gowan2014-03-111-4/+1
| | | | | Windows will automatically choose the correct icon size if this field is unset.
* win32: restore support for exe directory as config directoryelevengu2014-03-111-1/+5
| | | | | | | | Same rationale as b2c2fe7a but updated to work with path-win.c Signed-off-by: wm4 <wm4@nowhere> Merges/closes #543.
* crosscompile-mingw: improve instructions for MXEwm42014-03-111-0/+2
|
* sd_lavc: handle subtitles with no subtitle resolution setxylosper2014-03-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Set subtitle resolution to video resolution when avctx->width and avctx->height are zero. This can happen with broken vobsubs that have no size set in their .idx file (or Matroska extradata). At least with the test file provided in issue #551, using the video resolution as fallback instead of what guess_resolution() does is better. Note that these files clearly are broken. It seems this particular file was created by trying to use ffmpeg to transcode DVB subtitles to vobsub, and ffmpeg "forgot" to set the subtitle resolution in the destination file. On the other hand, ffmpeg DVB and PGS decoders set the resolution on the first subtitle packet (or somewhere close), so it's not really clear what to do here. Closes #551. Signed-off-by: wm4 <wm4@nowhere> Patch by xylosper, rewritten commit message by wm4.
* Parse::Matroska::Reader: get rid of `bigrat`Diogo Franco (Kovensky)2014-03-111-17/+20
| | | | | | | | | | | | | | | It seems that it was causing issues with certain perl setups (such as the one on issue #549). It also turns out that it was not behaving correctly (not all constants were being promoted to big nums as they should), so we use explicit objects to derive the constants. There were also precedence issues. I wonder if this even worked right to begin with. The 'double' path (8-byte floats) is untested, as I couldn't easily find a file with such a field. Closes #549.
* build: Add -U__STRICT_ANSI__ to CFLAGS on CygwinDiogo Franco (Kovensky)2014-03-111-0/+1
| | | | | | | | | | | | Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros, including _GNU_SOURCE; as a result, a lot of functions and defines get masked out -- important defines such as M_PI and strcasecmp. Work around it by undefining __STRICT_ANSI__ on cygwin systems. This will still cause compilation issues on any non-cygwin system that uses newlib, but hopefully nobody does that, or if they do, they will find this commit message and know to add -U__STRICT_ANSI__ to their CFLAGS. Hopefully.
* sub: handle vobsub-in-mp4wm42014-03-115-0/+44
| | | | | | | | | | | The mplayer decoder (spudec.c) actually handled this. There was explicit code for binary palettes (16 32 bit values), and the subtitle resolution was handled by video resolution coincidentally matching the subtitle resolution. Whoever puts vobsub into mp4 should be punished. Fixes the sample gundam_sample.mp4, closes github issue #547.
* sd_lavc: use mp_lavc_set_extradata()wm42014-03-111-2/+2
| | | | | This includes the magical input padding required by libavcodec, which we possibly didn't do before this commit.
* Factor out setting AVCodecContext extradatawm42014-03-114-39/+27
|
* cocoa: fix deadlock during initialization [2]Stefano Pigozzi2014-03-111-6/+3
| | | | Fixup commit for 20fa191ad.
* build: bump libmpg123 versionwm42014-03-111-1/+1
| | | | | | | | | The minimum required version was bumped in the old configure script, but for the waf build system is was somehow forgotten or overlooked. Probably happened while the waf build system was developed in a separate branch. Closes #546.
* cocoa: fix deadlock during initializationStefano Pigozzi2014-03-111-1/+2
| | | | | | Thanks to @wm4 for catching the bug. Fixes #405
* 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