summaryrefslogtreecommitdiffstats
path: root/player
</
Commit message (Collapse)AuthorAgeFilesLines
* lua: add license headerwm42014-03-111-0/+17
| | | | Oops.
* command: fix null pointer dereference in idle modewm42014-03-111-2/+2
| | | | Pressing 'h' in idle mode -> crash.
* input: check for abort cmd in multi-commandswm42014-03-111-1/+1
| | | | | | | | | 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.
* 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.
* command: fix metadata propertywm42014-02-121-2/+2
| | | | This crashed when retrieving the raw property value. Oops.
* 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.
* player: refresh OSD on track switchingwm42014-02-121-0/+2
| | | | Apparently, at least sub_reload was missing a refresh at all.
* w32: use safe DLL search paths everywhereJames Ross-Gowan2014-01-311-0/+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.
* player: avoid stalling when starting a network streamwm42014-01-151-2/+7
| | | | | | | | | | | | 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.)
* 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.
* 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.
* 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.
* 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.
* demux_subreader: reject file if not opened by --subwm42014-01-061-0/+1
| | | | | | | 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.
* dvdnav: set correct stride for fake highlightswm42014-01-061-1/+1
| | | | | This didn't really matter, because the fake highlight rectangle is in a single color, and every pixel has the same color value.
* player: load encoding-profiles.conf before the main configwm42014-01-011-7/+7
| | | | Otherwise one can't add profiles based on the encoding profiles.
* player: fix DVD playbackwm42014-01-011-1/+1
| | | | | | | Crashed in case of lazily added subtitle streams, which add tracks with track->stream set to NULL. Fixes gituhub issue #439.
* video: fix --brightness etc. optionswm42013-12-291-0/+14
| | | | They were set before the VO was intitialized, which silently failed.
* player: add two more font mimetypes recognized by Haaliwm42013-12-291-1/+3
| | | | | | | | | | | | | | The Haali Matroska splitter is basically the reference implementation for this crap, and it knows only: application/vnd.ms-opentype application/x-font-ttf application/x-truetype-font Two of them were missing in our code. One of them, "application/x-font", is probably plain incorrect, but I can't really tell. Also see: http://www.cccp-project.net/beta/test_files/fontsample.mkv
* player: use arrays to list font mimetypes and font file extensionswm42013-12-291-9/+15
|
* Install encoding-profiles.conf by defaultwm42013-12-281-9/+26
| | | | | | | | | | | | This is probably useful. Note that this includes a small, stupid hack to prevent loading of the config file if vf_lavfi is not available. The profile by default uses vf_lavfi, and the config parser will output errors if vf_lavfi is not available. As another caveat, we install the example profile even if encoding is disabled (though we don't load it, since this would print errors).
* player: fix buggy error condition when loading mpv.confwm42013-12-281-1/+1
|
* options: simplify handling of some help optionswm42013-12-261-4/+0
|
* player: deselect secondary sub when switching to file with different trackswm42013-12-251-0/+2
| | | | | | This applies the usual logic of resetting stream selections to default when switching to a file with a different track layout. (This is to prevent selecting random streams.)
* player: fix initial selection with --secondary-sidwm42013-12-251-3/+21
| | | | | | | | Also, make sure that a track can't be selected twice. While this might work in some situations, it certainly won't work with subtitles demuxed from a stream. Fixes #425.
* player: add --secondary-sid for displaying a second subtitle streamwm42013-12-248-83/+166
| | | | | | | This is relatively hacky, but it's Christmas, so it's ok. This does two things: 1. allow selecting two subtitle tracks, and 2. include a hack that renders the second subtitle always as toptitle. See manpage additions how to use this.
* player: add infrastructure to select multiple tracks at oncewm42013-12-246-43/+64
| | | | | Of course this does not allow decoding multiple tracks at once; it just adds some minor infrastructure, which could be used to achieve this.
* player: do initial seek for external tracks only oncewm42013-12-241-2/+12
| | | | | | Normally, there can be only one demuxer stream active for each demuxer of an external file, but this assumption will be broken for multiple subtitles support.
* player: slightly simplify seeking in external fileswm42013-12-241-16/+9
| | | | | | | For some reason, this checked whether there are external tracks at all before doing any seeks. Possibly this was to avoid multiple get_main_demux_pts() calls, but calling this multiple times shouldn't be too bad.
* player: redo demuxer stream selectionwm42013-12-247-85/+79
| | | | | | | Use struct track to decide what stream to select. Add a "selected" field and use that in some places instead of checking mpctx->current_track.
* player: fix typo in previous commitwm42013-12-231-1/+1
| | | | Apparently I pushed too quickly.
* player: warn if Matroska font attachments have incorrect MIME typewm42013-12-231-2/+11
| | | | | | Normally we shouldn't load these files. But for some reason it was added in commit b784346e some years ago, and disabling this hack would probably be an inconvenience. So just print a warning.
* player: simplify mp_load_per_file_configwm42013-12-221-8/+7
| | | | | Get rid of the stupid and error-prone buffer size calculations, use snprintf instead of strcpy.
* player: move code aroundwm42013-12-222-42/+37
| | | | | | The only thing that used mp_load_per_file_config() was inside configfiles.c too, so remove the declaration from core.h and move the function before its use.
* player: remove code duplication for auto-loaded config profileswm42013-12-221-60/+14
| | | | | | Code for loading "[vo.vdpau]" profiles and similar. The messages printed on loading change, but other than that, everything should behave about the same.
* path: change mp_splitext() semanticswm42013-12-221-1/+1
| | | | | | | | | Including the "." in the returned extension was too inconvenient. I think originally, the semantics were supposed to work like in Python, but screw this. Also, return NULL instead of "" on failure (which is what its only user actually seems to expect).
* Don't include version.h from make options.cwm42013-12-221-2/+7
| | | | | | | | | I find this annoying. It's the reason common/version.c exists at all. options.c did this for the user agent, which contains the version number. Because not including version.h means you can't build the user agent and use it in mp_default_opts anymore, do something rather awkward in main.c to initialize the default user agent.
* msg: remove global statewm42013-12-211-1/+6
|
* player: use separate msg prefix for statuslinewm42013-12-213-3/+5
| | | | | So the user can specifically mute or unmute the status line with --msglevel. Accidentally removed with commit 5e0c4ec3.
* msg: rename mp_msg_log -> mp_msgwm42013-12-213-15/+15
| | | | Same for companion functions.
* msg: convert defines to enumwm42013-12-211-1/+1
| | | | Also get rid of MSGL_HINT and the many MSGL_DBG* levels.
* path lookup functions: mp_msg conversionswm42013-12-217-68/+70
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* quvi: mp_msg conversionswm42013-12-211-3/+3
|
* stream: mp_msg conversionswm42013-12-214-6/+6
| | | | We also drop some slave mode stuff from stream_vcd.
* demux: mp_msg conversionswm42013-12-215-9/+10
| | | | | | | The TV code pretends to be part of stream/, but it's actually demuxer code too. The audio_in code is shared between the TV code and stream_radio.c, so stream_radio.c needs a small hack until stream.c is converted.
* playlist_parser: mp_msg conversionwm42013-12-211-1/+1
|
* x11: mp_msg conversion for fstype help outputwm42013-12-211-1/+1
|
* encode_lavc: mp_msg conversionswm42013-12-211-2/+3
| | | | Miss two mp_msg calls, because these conflict with future commits.
* options: some more mp_msg conversionswm42013-12-211-1/+1
|
* av_log: mp_msg conversionwm42013-12-211-2/+2
| | | | | | | | This is pretty nasty, because FFmpeg/Libav is yet another library with a global message callback. We do something with mutexes trying to get it done, but of course we can't actually solve this problem. If more than one library in a process use FFmpeg/Libav, only one of them will get log messages.
* m_option, m_config: mp_msg conversionswm42013-12-213-15/+16
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* m_property: mp_msg conversionswm42013-12-213-5/+6
| | | | | Includes some semi-crappy hacks to avoid changing too much code for this conversion (allowing NULL log argument for m_property_do()).
* input: rework how input sources are addedwm42013-12-211-23/+10
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* m_config: add custom context to includefunc callbackwm42013-12-211-2/+4
|
* sub/osd: mp_msg conversionswm42013-12-214-5/+9
|
* find_subfiles: mp_msg conversionswm42013-12-211-1/+1
|
* player/timeline: mp_msg conversionswm42013-12-213-39/+36
|
* codecs: mp_msg conversionwm42013-12-211-2/+3
|
* audio: mp_msg conversionswm42013-12-211-0/+2
|
* mixer: mp_msg conversionswm42013-12-211-1/+1
|
* lua: minor simplificationwm42013-12-211-2/+1
| | | | | Using m_property_do() is more complicated, and will have to be changed later for mp_msg conversions.
* player: use MSGL_SMODE for some slave-mode stuffwm42013-12-212-10/+10
| | | | | Replacement for MSGT_IDENTIFY. Can't kill it off completely yet; certain people would complain to me personally.
* image_writer: mp_msg conversionswm42013-12-211-2/+2
| | | | Adds an awkward mp_log argument for error messages.
* video/decode: mp_msg conversionswm42013-12-211-0/+2
| | | | Doesn't cover vdpau/vaapi parts yet, because these are a bit messier.
* video/filter: mp_msg conversionswm42013-12-211-1/+1
|
* msg: change --msglevel, reduce legacy gluewm42013-12-201-0/+3
| | | | | | | | | | | | Basically, reimplement --msglevel. Instead of making the new msg code use the legacy code, make the legacy code use the reimplemented functionality. The handling of the deprecated --identify switch changes. It temporarily stops working; this will be fixed in later commits. The actual sub-options syntax (like --msglevel-vo=...) goes away, but I bet nobody knew about this or used this anyway.
* terminal: abstract terminal color handlingwm42013-12-201-1/+1
| | | | | | | | Instead of making msg.c an ifdef hell for unix vs. windows code, move the code to separate functions defined in terminal-unix.c/terminal- win.c. Drop the code that selects random colors for --msgmodule prefixes.
* osc: use mp.send_commandvwm42013-12-201-18/+18