aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* demux_mkv: support vp9Gravatar wm42013-04-20
| | | | Note that ffmpeg doesn't provide a decoder by default yet.
* core: matroska: support concatenated segmentsGravatar wm42013-04-20
| | | | | | | | | | | | | | | | | | | | | Matroska files can contain multiple segments, which are literally further Matroska files appended to the main file. They can be referenced by segment linking. While this is an extraordinarily useless and dumb feature, we support it for the hell of it. This is implemented by adding a further demuxer parameter for skipping segments. When scanning for linked segments, each file is opened multiple times, until there are no further segments found. Each segment will have a separate demuxer instance (with a separate file handle etc.). It appears the Matroska spec. has an even worse feature for segments: live streaming can completely reconfigure the stream by starting a new segment. We won't add support for it, because there are 0 people on this earth who think Matroska life streaming is a good idea. (As opposed to serving Matroska/WebM files via HTTP.)
* demux_mkv: don't terminate if there are no clustersGravatar wm42013-04-20
| | | | | | Matroska segment linking allows abusing Matroska files as playlists without any actual video/audio/sub data, making files without any clusters still useful for the frontend.
* mplayer: take tracks from first segment if main file is emptyGravatar wm42013-04-20
| | | | | | | | | | | With Matroska ordered chapters, the main file (i.e. the file you're playing) can be empty, while all video/audio data is in linked files. Some files don't even contain the track list, only chapter information. mpv refused to play these, because normally, the main file dictates the track layout. Fix this by using the first segment for track data if no part of the timeline is sourced from the main file.
* demux_mkv: simplify handle_block() logic a bitGravatar wm42013-04-20
|
* demux_mkv: verify laces separately, and in all casesGravatar wm42013-04-20
|
* demux_mkv: get rid of the duplicated lace case labelsGravatar wm42013-04-20
| | | | | Also change the extracting of the lace type bitfield from flags to make it more apparent that the value range is 0-3.
* demux_mkv: there can be 256 lacesGravatar wm42013-04-20
| | | | | The lace number is stored with an offset of 1, so the maximum number of laces is 255+1=256.
* demux_mkv: check block malloc() resultGravatar wm42013-04-20
|
* demux_mkv: use a bounded buffer for block dataGravatar wm42013-04-20
| | | | Should help avoiding out-of-bounds reads.
* demux_mkv: static allocation for lace sizes bufferGravatar wm42013-04-20
| | | | | | | | Avoid messy memory management and error handling. remove tmp_lace_buffer non-sense Not sure how my mind got 8k, or how this made sense at all.
* demux_mkv: remove redundant checkGravatar wm42013-04-20
|
* demux_mkv: fix seeking with index generationGravatar wm42013-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Relative seeks backwards didn't work too well with incomplete files, or other files that are missing the seek index. The problem was that the on-the-fly seek index generation simply added cluster positions as seek entries. While this is perfectly fine, the seek code had no information about the location of video key frames. For example, a 5 second long cluster can have only 1 video key frame, which is located 4 seconds into the cluster. Seeking backwards by one second while still located in the same cluster would select this cluster as seek target again. Decoding would resume with the key frame, giving the impression that seeking is "stuck" at this frame. Make the generated index aware of key frame and track information, so that video can always be seeked in an idea way. This also uses the normal block parsing code for indexing the clusters, instead of the suspicious looking special code. (This code didn't parse the Matroska elements correctly, but was fine for files with normal structure. Files with corrupted clusters or clusters formatted for streaming were not handled properly.) Skipping is now quite a bit slower (takes about twice as long as before), but it removes the special cased skipping code, and it's still much faster (at least twice as fast) than libavformat. It needs to do more I/O (no more skipping entire clusters, all data is read), and has more CPU usage (more data needs to be parsed).
* demux_mkv: move Block header parsing codeGravatar wm42013-04-20
| | | | | | Move parts of the Block element parsing to read_block(). This way read_block() can return block time and track information in struct block_info.
* demux_mkv: split reading blocks and reading packetsGravatar wm42013-04-20
| | | | | | Move most code from demux_mkv_fill_buffer() to read_next_block(). The former is supposed to read raw blocks, while ..fill_buffer() reads blocks and turns them into packets.
* demux_mkv: move BlockGroup reading code to a separate functionGravatar wm42013-04-20
| | | | | | | | | | Somehow this was setup such that a BlockGroup can be incrementally read (at least in theory). This makes no sense, as BlockGroup can contain only one Block (despite its name). There's no need to read this incrementally, and makes the code confusing for no gain. Read all the BlockGroup sub-elements with a single function call, without keeping global state for BlockGroup parsing.
* demux_mkv: factor block readingGravatar wm42013-04-20
| | | | | | | | | | The code for reading block data was duplicated. Move it into a function. Instead of returning on error (possibly due to corrupt data) and signalling EOF, continue by trying to find the next block. This makes error handling slightly simpler too, because you don't have to care about freeing the current block. We could still signal EOF in this case, but trying to resync sounds better for dealing with corrupted files.
* demux_mkv: fix streaming clustersGravatar wm42013-04-20
| | | | | | Matroska files prepared for streaming have clusters with unknown size. These files are pretty rare, see e.g. test4.mkv from the official Matroska test file collection.
* demux_mkv: simplify cluster reading codeGravatar wm42013-04-20
| | | | | | | | | | | | | The end positions of the current cluster and block were managed by tracking their size and how much of them were read, instead of just using the absolute end positions. I'm not sure about the reasons why this code was originally written this way. One obvious concern is reading from pipes and such, but the stream layers hides this. stream_tell(s) works even when reading from pipes. It's also a fast call, and doesn't involve the stream implementation or syscalls. Keeping track of the cluster/block end is simpler and there's no reason why this wouldn't work.
* demux_mkv: use normal index data structure even for incomplete filesGravatar wm42013-04-20
| | | | | | | | | | | | Incomplete files don't have a valid index, because the index is usually located near the end of a file. In this case, an index is created on the fly during demuxing, or when seeks are done. This used a completely different code path, which leads to unnecessary complications and code duplication. Use the normal index data structure instead. The seeking code at the end of seek_creating_index() (in this commit renamed to create_index_until()) is removed. The normal seek code does the same thing instead.
* manpage: clarify --cache behaviorGravatar wm42013-04-20
|
* Merge pull request #62 from maletor/patch-1Gravatar wm42013-04-18
|\ | | | | Fix typo for opengl dither-depth default
| * Fix typo for opengl dither-depth defaultGravatar Ellis Berner2013-04-18
|/
* cocoa_common: keep aspect ratio when clipping windowGravatar Stefano Pigozzi2013-04-17
| | | | | With commit 33ffc283 resizing to double size would cause the window to lose aspect ratio. This commit fixes this bug.
* change reverse DNS strings to io.mpv.*Gravatar Stefano Pigozzi2013-04-16
| | | | fixes #60
* cocoa_common: refactor centered resizeGravatar Stefano Pigozzi2013-04-16
| | | | | | This refactor makes the code easier to understand. Also corrects a bug that caused the window to move to the left when the new size was bigger than the visible frame.
* encoding: when output is pipe: or pipe:1, avoid mp_msg to stdoutGravatar Rudolf Polzer2013-04-15
| | | | | | | | | I am aware this detection may occur too late, depending on other settings, but at least it usually works and is portable. Where the output fd can be changed, though, it'd be better to force a similar behaviour via file descriptor use: use pipe:3 as output to FD 3, and change the calling program to expect the stream on FD 3.
* sub: add --osd-blur and --sub-text-blur optionsGravatar wm42013-04-13
| | | | | | | | | These require bleeding edge libass (latest git version), and will be ignored otherwise. I'm not sure about the blur factor and scaling. The ASS/VSFilter semantics for blur scaling are a bad mess. Might require further investigation.
* audio/decode: remove vararg from ad_control()Gravatar wm42013-04-12
| | | | | This was unused and dumb. Ancient MPlayer used varargs instead of void* arguments for control() functions, and this was the last leftover.
* osd_libass: actually free ASS_TracksGravatar wm42013-04-12
| | | | Not a real leak, just for getting clean valgrind reports on exit.
* demux: simplify chapter appending codeGravatar wm42013-04-12
| | | | | This pre-allocation looked tricky and awkward. Use MP_TARRAY_APPEND(), which makes the code simpler. This even keeps the pre-allocation.
* demux: always sort chaptersGravatar wm42013-04-12
| | | | | | | | | | | The condition that checked whether the chapters are out of order and should be sorted was inverted. This likely wasn't noticed in testing, because even if the chapters are unsorted, if the last two chapters were sorted, the rest got sorted too. Instead of doing this silly check, always sort the chapters after demuxer initialization. Also make sure the sort order is stable in case chapter start times are the same (original_index check).
* core: remove dead --vsync leftoversGravatar wm42013-04-12
|
* command: fix deref before NULL checkGravatar wm42013-04-12
| | | | Was accidentally broken in the last global variable removal round.
* ao_jack: fix deprecation warningGravatar Stefano Pigozzi2013-04-12
| | | | | jack_port_get_total_latency is deprecated: use the "new" API based on jack_port_get_latency_range instead.
* mplayer: remove unnecessary variableGravatar wm42013-04-10
|
* core: add --reset-on-next-file optionGravatar wm42013-04-10
| | | | | | | This option can be used to selectively reset settings when playing the next file in the playlist (i.e. restore mplayer and mplayer2 behavior). Might remove this option again should it turn out that nobody uses it.
* mplayer: keep volume persistent, even when using --volumeGravatar wm42013-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider: mpv --volume 10 file1.mkv file2.mkv Before this commit, the volume was reset to 10 when playing file2.mkv. This was inconsistent to most other options. E.g. --brightness is a rather similar case. In general, settings should never be reset when playing the next file, unless the option was explicitly marked file-local. This commit corrects the behavior of the --volume and --mute options. File local --volume still works as expected: mpv --{ --volume 10 file1.mkv file2.mkv --} This sets the volume always to 10 on playback start. Move the m_config_leave_file_local() call down so that the mixer code in uninit_player() can set the option volume and mute variables without overwriting the global option values. Another subtle issue is that we don't want to set volume if there's no need to, which is why the user_set_volume/mute fields are introduced. This is important because setting the volume might change the system volume depending on other options.
* mplayer: move DVB channel skip codeGravatar wm42013-04-10
| | | | Try not to cause unnecessary special cases.
* mplayer: don't disable term-osd with -vGravatar wm42013-04-10
| | | | I don't see any reason for doing this.
* command: fix loadlist commandGravatar wm42013-04-10
| | | | | | | A simple inverted condition prevented it from working properly. Also, make sure that playlist is played from beginning when the playlist is replaced.
* configure: add -mconsole on MinGWGravatar wm42013-04-10
| | | | | | | | | At least libsdl adds -mwindows to the cflags, which marks the .exe binary as GUI application. This means the program detaches from the console when started in cmd.exe, instead of showing the playback status, receiving console input, and so on. Append -mconsole to the linker command line to disable -mwindows.
* mplayer: don't print bogus status when cachingGravatar wm42013-04-10
| | | | | When streaming from http, this could print a status line indicating paused playback instead of "buffering" sometimes.
* vf_divtc, vf_phase: Fix handling of subsampled formatsGravatar Martin Herkt2013-04-10
| | | | | | These filters incorrectly calculated the amount of bytes per line in each plane for chroma subsampled formats, causing undefined behavior.
* demux: fix a specific gcc 4.8 warning that may hint to mis-optimized codeGravatar Rudolf Polzer2013-04-09
| | | | | | | | CC demux/demux.o demux/demux.c: In function 'demuxer_switch_track': demux/demux.c:1241:29: warning: array subscript is above array bounds [-Warray-bounds] int new_id = demuxer->ds[type]->id; ^
* core: remove volstep global variableGravatar wm42013-04-09
|
* core: restore --mc default value (fixes A/V sync)Gravatar wm42013-04-09
| | | | | | | | | | | Commit bc20f2c moved the variable default_max_pts_correction (which backs the --mc option) to the MPOpts struct. The initializer was forgotten when doing this, so it was left at 0. This disabled part of the A/V sync mechanism. This was apparent when using ad_spdif (this decoder has other A/V sync related problems, and thus triggers this issue easily). Closes #59.
* make: add osxbundle-skip-depsGravatar Stefano Pigozzi2013-04-08
| | | | | | | This adds a way to generate a Mac OS X application bundle without the bundled dependencies. fixes #57
* vf_dlopen examples: add copyright headers (LGPL 2.1+)Gravatar Rudolf Polzer2013-04-08
|
* stream_cddb: fix compilation on MinGW-w64Gravatar Stephen Hutchinson2013-04-06
| | | | | Like the VCD case, stream_cddb.c relies on ntddcdrm.h, which is no longer under the ddk directory.