summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.3.8v0.3.8wm42014-04-171-1/+1
|
* af_lavcac3enc: detach on any passthrough format, not just ac3wm42014-04-171-1/+1
|
* README: mention minimum FFmpeg/Libav versionswm42014-04-171-0/+2
|
* talloc README: more human readible api referenceKevin Mitchell2014-04-171-1/+1
|
* wayland: don't schedule resize if going fullscreenRicardo Vieira2014-04-171-1/+0
| | | | mpv was resizing to the same size before it went to fullscreen, we don't need to schedule a resize because the compositor will send a configure event with the new dimensions and thats when we should do it.
* manpage: fix --vf=scale optionsJames Ross-Gowan2014-04-171-3/+3
|
* encode: write 2-pass stats only per-packetwm42014-04-171-1/+2
| | | | | | The stats were retrieved and written on every encode call, instead of every encode call that actually returned a packet. ffmpeg.c also does it this way, so it must be "more correct". Fixes 2-pass encoding.
* encode: add a missing \n to a log callwm42014-04-171-1/+1
| | | | | Conflicts: audio/out/ao_lavc.c
* terminal-unix: reject overlong termcap stringswm42014-04-171-0/+3
| | | | | | | | Our own tables have size for only 8 chars, so these sequences must be rejected. It seems strings of length 8 are still ok, because the code uses memcmp and not strcmp, so still allow these. Based on mplayer-svn commit r37129.
* vo_vdpau: add an additional check for timestamp robustnesswm42014-04-171-0/+16
| | | | | | | | | | This might be a good idea in order to prevent queuing a frame too far in the future (causing apparent freezing of the video display), or dropping an infinite number of frames (also apparent as freezing). I think at this point this is most of what we can do if the vdpau time source is unreliable (like with Mesa). There are still inherent race conditions which can't be fixed.
* vo_vdpau: document what WRAP_ADD doeswm42014-04-171-0/+2
| | | | This wasn't necessarily clear.
* vo_vdpau: simplify previous vsync timestamp calculationwm42014-04-171-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | The strange thing about this code was the shift parameter of the prev_vs2 function. The parameter is used to handle timestamps before the last vsync, since the % operator handles negative values incorrectly. Most callers set shift to 0, and _usually_ pass a timestamp after the last vsync. One caller sets it to 16, and can pass a timestamp before the last timestamp. The mystery is why prev_vs2 doesn't just compensate for the % operator semantics in the most simple way: if the result of the operator is negative, add the divisor to it. Instead, it adds a huge value to it (how huge is influenced by shift). If shift is 0, the result of the function will not be aligned to vsyncs. I have no idea why it was written in this way. Were there concerns about certain numeric overflows that could happen in the calculations? But I can't think of any (the difference between ts and vc->recent_vsync_time is usually not that huge). Or is there something more clever about it, which is important for the timing code? I can't think of anything either. So scrap it and simplify it.
* vo_vdpau: simplify time management and make it more robustwm42014-04-171-68/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_vdpau used a somewhat complicated and fragile mechanism to convert the vdpau time to internal mpv time. This was fragile as in it couldn't deal well with Mesa's (apparently) random timestamps, which can change the base offset in multiple situations. It can happen when moving the mpv window to a different screen, and somehow it also happens when pausing the player. It seems this mechanism to synchronize the vdpau time is not actually needed. There are only 2 places where sync_vdptime() is used (i.e. returning the current vdpau time interpolated by system time). The first call is for determining the PTS used to queue a frame. This also uses convert_to_vdptime(). It's easily replaced by querying the time directly, and adding the wait time to it (rel_pts_ns in the patch). The second call is pretty odd: it updates the vdpau time a second time in the same function. From what I can see, this can matter only if update_presentation_queue_status() is very slow. I'm not sure what to make out of this, because the call merely queries the presentation queue. Just assume it isn't slow, and that we don't have to update the time. Another potential issue with this is that we call VdpPresentationQueueGetTime() every frame now, instead of every 5 seconds and interpolating the other calls via system time. More over, this is per video frame (which can be portantially dropped, and not per actually displayed frame. Assume this doesn't matter. This simplifies the code, and should make it more robust on Mesa. But note that what Mesa does is obviously insane - this is one situation where you really need a stable time source. There are still plenty of race condition windows where things can go wrong, although this commit should drastically reduce the possibility of this. In my tests, everything worked well. But I have no access to a Mesa system with vdpau, so it needs testing by others. See github issues #520, #694, #695.
* vo_vdpau: more debugging outputwm42014-04-171-4/+20
| | | | Might help to debug certain problems with Mesa.
* remove redundant/outdated line from encodeing.rst:"what works"Kevin Mitchell2014-04-171-1/+0
|
* DOCS/encoding: make "What does not work yet" a proper RST sectionwm42014-04-171-0/+1
|
* ass_mp: don't use --subcp for --ass-styleswm42014-04-171-1/+1
| | | | | | | | | | | | | The --ass-styles option is implemented by calling ass_read_styles(). This function can take a codepage (so libass will use iconv to convert it). This was implemented before our --subcp option was changed, and this code was not updated. Now libass fails opening iconv, because --subcp is not always (and not by default) a valid iconv codepage. Just always pass NULL, which means the file passed to --ass-styles must be in UTF-8. The --ass-styles option is a fringe option anyway (and will destroy your subtitles), so having codepage support for it isn't important at all.
* Release 0.3.7v0.3.7wm42014-03-301-1/+1
|
* vf_eq: don't malloc priv structwm42014-03-301-1/+0
| | | | | There wasn't any reason for this. In fact, it's a memory leak. The proper priv struct is already allocated vf.c and the option parser.
* player: add missing "-" to options in workaround notice on A/V desynchronizationSebastian Morr2014-03-301-1/+1
| | | | | | While it technically works, using GNU-style options seems cleaner nowadays. Signed-off-by: wm4 <wm4@nowhere>
* player: dvdnav: fix start time when entering and leaving menuwm42014-03-301-0/+4
| | | | | Unfortunately, quite a hack, because we have check the nav state outside of discnav.c.
* mf: fix operation with --cachewm42014-03-301-0/+1
| | | | | | | | | | | | demux_mf.c explicitly checks for the stream type to check whether images are opened via pattern (mf://..., i.e. stream_mf.c) or directly. Of course the stream type is not set to STREAMTYPE_MF if the stream is wrapped through the cache, so it tried to open the pattern directly as file, which failed. Fix this by disabling caching for mf://. The cache doesn't make sense here anyway, because each file is opened and closed every frame (perhaps to avoid memory bloat).
* player: fix unchecked access for chapter metadatawm42014-03-301-3/+1
| | | | | | | | | | It's possible that MPContext has a chapter list, but the demuxer doesn't. In this case, accesing the chapter-metadata property would lead to invalid accesses. (This fixes the out of bound access, but in theory, the returned data can still be incorrect, since MPContext chapters don't need to map directly to demuxer chapters.)
* stream_cdda: print cd text header only if there are any cd text fieldswm42014-03-301-2/+6
|
* stream_cdda: remove unused stuffwm42014-03-305-254/+3
| | | | | | This cd_info_t struct was practically unused. The only thing it did was storing the track name of the form "Track %d" in a very roundabout way. Remove it. (It made more sense when there was still CDDB support.)
* stream_cdda: fix track time accuracywm42014-03-301-2/+2
| | | | | | | | | | Don't use an integer division to get the time, since that would round on second boundaries. Also round up the time by sector size. Seeking rounds down due to alignment constraints, but if we round up the time, we can make it land on the exact destination sector. This fixes that the track change code printed the previous track when seeking by chapter.
* stream_cdda: report track timeswm42014-03-301-27/+8
| | | | | | | | | Report the time for each chapter (tracks are treated as chapters). This allows us to get rid of the "old" chapter mechanism, and also behaves better with the frontend. This makes assumptions about the audio formats, but that format is hardcoded anyway in the rawaudio demuxer defaults (and always was).
* dvdnav: fix minor memory leakwm42014-03-301-0/+1
| | | | | | This was usually handled at the end of the switch statement, so if something returns from the function before that, the event has to be freed explicitly.
* dvdnav: make MP_NAV_EVENT_RESET_ALL handled properlyxylosper2014-03-302-31/+40
| | | | | | | | | | | dvdnav.c did not handle event in regular sequence. Usually this does not make any trouble except around MP_NAV_EVENT_RESET_ALL. Those events should be handled in regular sequence. If they're mixed, it can make wrong result. For instance, MP_NAV_EVENT_HIGHLIGHT right after MP_NAV_EVENT_RESET_ALL should not be ignored but it might be because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd hidden.
* dvdnav: prevent reallocation of fake highlight bufferxylosper2014-03-301-0/+2
| | | | | Since subsizes were never updated, the bitmap buffer was always reallocated whenever mp_nav_get_highlight() called.
* stream_bluray: fix for significant memory leakxylosper2014-03-301-0/+1
| | | | | It's obvious but, since STREAM_CTRL_GET_TIME_LENGTH is called frequently, the amount of leaked memory here is quite big.
* manpage: clarify what to pass to --hwdec-codecs optionwm42014-03-301-1/+3
|
* vd_lavc: ridiculous workaround for Libav 9 compatibilitywm42014-03-303-1/+23
| | | | | | | | This "sometimes" crashed when seeking. The fault apparently lies in libavcodec: the decoder returns an unreferenced frame! This is completely insane, but somehow I'm apparently still expected to work this around. As a reaction, I will drop Libav 9 support in the next commit. (While this commit will go into release/0.3.)
* DOCS/coding-style: add another requirement for commit messageswm42014-03-301-0/+3
|
* options: fix off-by-1 error in option help outputwm42014-03-301-1/+1
|
* manpage: af: minor syntax improvementswm42014-03-301-4/+4
| | | | | Conflicts: DOCS/man/en/af.rst
* build: fix unicode handling of the version stringRyan Goulden2014-03-301-1/+1
| | | | | | Don't pass unicode types to waf ENV. As per https://code.google.com/p/waf/issues/detail?id=1420 This directly fixes the "CFVersion" key in the .app bundle plist.
* player/main: Fix Cygwin buildJames Ross-Gowan2014-03-301-12/+8
| | | | | | | | | | | Xlib.h (included from x11_common.h) defines a macro 'Status' as 'int'. This messed up a bunch of definitions in windows.h and broke the build in Cygwin. Including windows.h first seems to solve the problem. This commit also removes the definition of an unused flag. Conflicts: player/main.c
* DOCS/coding-style: add an example and another rulewm42014-03-301-0/+25
|
* README: split list of dependencieswm42014-03-301-4/+13
| | | | | | | And make some additions. I'm not really sure why we list dependencies that are not ours, but that of external libraries. Still might be useful, though.
* DOCS: add coding stylewm42014-03-301-0/+111
| | | | | | I've tried not to be too detailed (because it's not a reference, just some guidelines), but it still got relatively long. Also contains conventions for sending patches.
* w32_common: prevent MOUSE_BTN0 sticking after dragJames Ross-Gowan2014-03-301-0/+2
| | | | | | The window doesn't recieve a WM_LBUTTONUP message after it's dragged, probably because it's swallowed by the modal loop. To stop the button from sticking, release it manually when the drag is complete.
* w32_common: capture mouse inputJames Ross-Gowan2014-03-301-0/+5
| | | | | | Mouse buttons can get stuck down if the button is pressed inside the video window and released outside. Avoid this by capturing mouse input when a button is pressed.
* options.rst: correct broken URLDiogo Franco2014-03-301-1/+1
|
* 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
| | | | | | | | | | | | | | |