Commit Graph

35874 Commits

Author SHA1 Message Date
wm4 756d45e414 Release 0.1.7 2013-09-20 21:33:32 +02:00
wm4 1cfa0a69ac manpage: af_volnorm was renamed 2013-09-20 21:33:32 +02:00
wm4 dea583410c vf: fix filter initialization error check
vf_open returns 0 on error, 1 on success. Oops. Accidentally broken
with 6629a95.
2013-09-20 21:33:32 +02:00
Johan Kiviniemi 568ab3672a ao_pulse: bug fix: goto the correct error handler
Conflicts:
	audio/out/ao_pulse.c
2013-09-20 21:33:32 +02:00
Johan Kiviniemi 0dd66b8b2c ao_pulse: set the property media.role=video
Adjusted for the stable branch.

Signed-off-by: wm4 <wm4@nowhere>
2013-09-20 21:33:32 +02:00
Martin Herkt 31a5fe6fa8 x11_common: fix behavior if XCreateIC() fails
This consists of 3 commits squashed and cherry-picked from master
(there were some minor conflicts):

vo/x11_common: Fail init with no valid XIM

XOpenIM can fail to find a valid input method, in which case it
returns NULL. Passing a NULL pointer to XCreateIC would cause a
crash, so fail VO init before that happens.

vo/x11_common: remove superfluous msg prefixes

Conflicts:
	video/out/x11_common.c

vo/x11_common: don't require a working input method

Normally, we need this for Xutf8LookupString(). But we can just fall
back to XLookupString(). In fact, the code for this was already there,
the code was just never tested and was actually crashing when active
(see commit 2115c4a).
2013-09-20 21:33:32 +02:00
Alexander Preisinger 36fe16cc7e wayland/common: exit properly on fd errors
Before this commit there was just an error message, but the file descriptor was
still open. Now we close the file descriptor and prevent it from calling
endlessly. Also a CLOSE_WIN event is sent which closes the window eventually if
the action of CLOSE_WIN is set to quit or quit_watch_later.
2013-09-20 21:21:40 +02:00
wm4 c52ca90492 af_export: fix compilation warning
Blargh.
2013-09-20 21:21:27 +02:00
wm4 939d34e8f1 Config path functions can return NULL
It's quite unlikely, but functions like mp_find_user_config_file() can
return NULL, e.g. if $HOME is unset.

Fix all the code that didn't check for this correctly yet.
2013-09-20 21:21:23 +02:00
wm4 bb2238516b path: fix undefined behavior
The homepath variable was static, and its value was set to a stack
buffer. This means a second invocation of the function would trigger
undefined behavior. Moreover the stack buffer always went out of scope
before homepath was used.
2013-09-20 21:20:58 +02:00
wm4 ab816f1ab1 mplayer: read subtitle packets as soon as possible
Call update_subtitles() on every iteration of the playloop, so that
subtitle packets are read as soon as possible, instead of every time a
video frame is displayed. This helps in case the packet queue is swamped
with subtitle packets, which can happen with certain insane mkv files.
The change will simply cause the subtitle queue to be emptied on each
playloop iteration.

The timestamps update_subtitles() uses for display are the same before
and after this commit. (Important for files which have subtitle packets
with timestamps or duration not set.)
2013-09-20 21:20:36 +02:00
wm4 7b8d360288 demux_mkv: don't add too many subtitle packets during seeking
In insane files with a very huge number of subtitle events, and if the
--demuxer-mkv-subtitle-preroll option is given, seeking can still
overflow the packet queue. Normally, the subtitle_preroll variable
specifies the maximum number of packets that can be added. But once this
number is reached, the normal seeking behavior is enabled, which will
add all subtitle packets with the right timestamps to the packet queue.
At this point the next video keyframe can still be quite far away, with
enough subtitle packets on the way to overflow the packet queue.

Fix this by always setting an upper limit of subtitle packets read
during seeking. This should provide additional robustness even if the
preroll option is not used.

This means that even with normal seeking, at most 500 subtitle packets
are demuxed. Packets after that are discarded.

One slightly questionable aspect of this commit is that subtitle_preroll
is never reset in audio-only mode, but that is probably ok.
2013-09-20 21:20:33 +02:00
wm4 3394072795 manpage: remove bogus space in example usage 2013-09-20 21:20:29 +02:00
wm4 4adcbe4d9c manpage: remove version and date fields
These would have to be updated manually all the time. Replacing them
automatically would be possible, but additional work, and would force
regeneration of the manpage way too often.

We decided that we don't need these fields.
2013-09-20 21:20:22 +02:00
Stefano Pigozzi b3a0557bc8 stream_dvd: prevent segmentation fault with some broken files
I have a sample where some final chapters are missing. This was causing a
segmentation fault when trying to fetch chapter times for them.

This makes the code ignore those chapters.
2013-09-20 21:19:30 +02:00
Bilal Syed Hussain 15dd1d1f8d macosx: add webm the filetypes handled by the bundle 2013-09-20 21:19:25 +02:00
Stefano Pigozzi 94cf61e9b8 README: add clarification about --enable 2013-09-20 21:19:13 +02:00
Stefano Pigozzi dc83660175 README: update Contact info with Mailing Lists 2013-09-20 21:19:10 +02:00
wm4 11602fd31a mplayer: print a message when writing watch_later config for resume
Putting this into stable, because it might help debugging certain
issues, and also making the user aware what's happening.
2013-09-20 21:18:32 +02:00
wm4 7973487a4c Release 0.1.6 2013-09-13 22:04:48 +02:00
xylosper c2ba42e02d vd_lavc: reset last_sample_aspect_ratio in uninit_avctx()
In init_vo(), if sh->aspect is 0 or last_sample_aspect_ratio is set,
sh->aspect is overwritten. With software decoding fallback behaviour,
this makes the aspect ratio from container ignored since
last_sample_aspect_ratio is already set in first try with hardware
decoding.
2013-09-13 22:04:47 +02:00
Stefano Pigozzi 1b8affee0e macosx_application: fix file opening on 10.9 (for real this time)
I did commit 86c05655d by thinking `mpv` already removed the `mpv` from
argc/argv. It actually is still there, so the argc must be 1 to check for no
arguments.

Thanks to @Nyx0uf for pointing out the bug and for testing on 10.9!
2013-09-13 22:04:47 +02:00
Stefano Pigozzi 0f1a871d65 macosx: always active bundle path lookup if cocoa is active
This is not really something you want to disable anyway. If there is no bundle
the code already does it's falbacks anyway.
2013-09-13 22:04:47 +02:00
Stefano Pigozzi 2e5610c23a macosx_application: fix file opening on OS X 10.9 (hopefully)
File opening through Finder, apparently drops `--psn` arguments on Mavericks
and just uses no args. Modify the code to account for that case.

This wasn't tested on 10.9 itself (I don't have a paid dev account), but it
*should* work if I understood the problem correctly.
2013-09-13 22:04:47 +02:00
Martin Herkt c472782c3e mpvcore/path: Fix non-MinGW builds
Well that was dumb.
2013-09-13 22:04:47 +02:00
Martin Herkt 601c285d83 mpvcore/path: Fix config path handling on Windows
Previously, mpv incorrectly used the %HOME% environment variable on
MinGW to determine the current user’s home directory. This is wrong;
the correct variable to use would be %HOMEPATH%, which would however
still be wrong since application data goes into the application data
directory, not the user’s home. This patch makes it use the local
AppData path instead of reading an environment variable.

This however exposed another problem (which also affected users who
actually had the %HOME% variable set):
b2c2fe7a37 (discussed in issue #95) introduced some changes that
make mpv load user config files from the executable path on Windows.
The problem with this change is that config_dir was still declared
static, so once a config file had been found in the executable path,
it would set config_dir to an empty string, so mpv would dump e.g.
watch_later data straight into the user’s home. This commit also
fixes that.

One side effect of this is that mpv no longer considers the “mpv”
subdirectory in the executable path (that behavior resulted from
the homedir variable always being empty), unless it is somehow
unable to determine the local AppData path.
2013-09-13 22:04:47 +02:00
Stefano Pigozzi b950afb6ea Makefile: update DIRS to fix cleaning
Commits 40624100 and 72f2942df didn't update the variable accordingly.
2013-09-13 22:04:47 +02:00
Alexander Preisinger 3ed671e369 wayland/common: improved error messages
The previous error message were not very usefull.
Also include a hint where to look for solutions.

Conflicts:
	video/out/wayland_common.c
2013-09-10 18:11:58 +02:00
wm4 3959702a1d stream: force demuxer of cached stream, fixes cdda:// + cache 2013-09-10 17:36:22 +02:00
wm4 4826eb8daf manpage: various improvements
Took a superficial look at the manpage, and fixed whatever I spotted.

Cherry picked from master, but required adjustments.
2013-09-10 17:33:29 +02:00
Martin Herkt 2a79912ef1 Manpage: Fix formatting (mostly for PDF output) 2013-09-10 17:28:51 +02:00
wm4 7dbed3f019 demux_mkv: don't overflow packet queue when doing sub-preroll
Consider the cluster used for prerolling contains an insane amount of
subtitle packets. Then the demuxer packet queue would be full of
subtitle packets, and demux.c would refuse to read any further packets -
including video and audio packets, resulting in EOF. Since everything
involving Matroska and subtitles is 100% insane, this can actually
happen.

Fix this by putting a limit on the number of subtitle packets read by
preroll, and throw away any further packets if the limit is exceeded. If
this happens, the preroll mechanism will stop working, but the player's
operation is unaffected otherwise.
2013-09-08 07:47:26 +02:00
wm4 ecd2d90190 Release 0.1.5 2013-09-07 08:56:06 +02:00
wm4 73e4094770 options: fix --volume option range, add some explanations to manpage
The --volume option accepted values up to 10000, but internally, the
value is always clipped to 0-100 range. What makes this even worse is
that --softvol-max suggests that it extends the range of --volume, which
is not the case. (And passing a volume larger than 100 to --volume
didn't even print a warning.)
2013-09-07 08:54:28 +02:00
wm4 f5572919e4 demux_lavf: workaround for broken libavformat subtitle seeking
The really funny thing about this commit is that this code is added on
top of another work around. Basically, subtitle seeking in libavformat
is completely broken. To make it useful, we have to add yet another
workaround.

The basic problem is that libavformat's subtitle seeking code always
uses the stream time base, instead of AV_TIME_BASE if stream index -1 is
passed to the avformat_seek_file() function.

Fixes github issue #216. Hopefully this will be fixed in ffmpeg too at
some point.
2013-09-07 08:52:14 +02:00
wm4 93bf6eba3b mplayer: try to resume playback only if a resume file actually exists
Well, this was dumb. The resume message was printed for every file,
whether a resume config file existed or not.
2013-09-07 08:51:36 +02:00
wm4 150aeafdd2 audio: fix playback of Musepack SV8 files
This is basically a libavcodec API oddity: it can happen that
avcodec_decode_audio4() returns 0 (meaning 0 bytes were consumed). It
requires you to feed the complete packet again to decode the full
packet, and to successfully decode the following packets.

We ignored this case with the argument that there's the danger of an
endless decode loop (because nothing of that packet is apparently
decoded, so it would retry forever), but change it in order to decode
mpc8 files correctly.

Also add some comments to explain the mess.
2013-09-04 08:50:32 +02:00
wm4 1ef0d02245 tv: attempt to support mjpeg streams
MPlayer handles this correctly, because MPlayer still has the FourCC
codec dispatch (codecs.conf). We need to handle this case specially,
because the libavformat rawvideo decoder will of course not eat mjpeg.

mjpeg is the only supported format, though. (Even MPlayer needs to
convert between V4L2 formats and MPlayer FourCCs, and mjpeg is the only
non-raw format.)
2013-09-04 01:42:52 +02:00
wm4 74be07c36d mplayer: handle --reset-on-next-file=""
The option list contains an empty string member with this option value,
so ignore that. I'm not sure whether the option list should maybe be
empty in this case, but it could be the wrong thing in case of other
options.
2013-09-04 01:42:49 +02:00
wm4 54c371a293 mplayer: don't let playback resume force options that are file local
This happens by default with pausing: if a file was paused when doing
quit_watch_later, then resume and unpause, then the file played after
that would start in paused mode. This is because the pause option is
backed up at thr wrong place, so it backs up the state from resuming,
instead of whatever it was set to before that.
2013-09-04 01:42:46 +02:00
wm4 4788b8323c configure: fix some descriptions in the help output 2013-09-04 01:41:35 +02:00
wm4 df20f8fc06 Release 0.1.4 2013-08-29 22:18:28 +02:00
wm4 c47bf17c0f input: fix --no-input-default-bindings
The option did nothing. This was probably broken with 5b38a52.
2013-08-29 19:20:17 +02:00
wm4 64faa8c66b gl_video: don't crash if no FBOs are available
This probably has been broken since bbc865a: a test was added that uses
a FBO, but it's always run, even if FBOs were not detected. On the other
hand, fbotex_init() just runs into an assert. Fix the test that
triggered this condition, and make fbotex_init() "nicer" by just failing
if FBOs are not available.
2013-08-29 19:20:14 +02:00
Stefano Pigozzi 2f26f0b052 cocoa_common: autohide dock when autohiding menubar
A cocoa bug doesn't allow to do otherwise. Will open a radar later.
2013-08-29 19:20:08 +02:00
wm4 4fef2097ce gl_video: fix odd video sizes with PBOs
Odd video sizes if pixel formats with chroma subsampling and PBOs were
used, garbage was rendered. This was because the PBO path created
buffers with an unpadded size, and then tried to upload a padded
image to it. Fix it by explicitly setting the padded size. (As with
the non-PBO path, we rely that image allocations are somehow padded,
which is normally the case.)
2013-08-29 19:20:05 +02:00
Stefano Pigozzi 669f5d42f0 configure: fix help for macosx-bundle from autodetected to disabled
The help and configure result wrongly showed this feature was autodetected,
while it is infact disabled by default.
2013-08-29 19:19:35 +02:00
wm4 f0d245ce4b Release 0.1.3 2013-08-23 15:50:04 +02:00
Stefano Pigozzi 815ad3f011 cocoa_common: avoid locking calls when not needed
cocoa_common contains some locking calls to support video outputs that support
live resizing (at this moment only vo=opengl).

These should not be used unless the VO declares it is multithreaded by
registering the resize_redraw callback used for live resizing.

Fixes #200
2013-08-23 15:43:46 +02:00
wm4 69d46b1d95 demux: check whether stream is selected in demux_get_next_pts()
Otherwise, this would just try to demux a good chunk of the file, even
though the operation can't succeed anyway.

This caused some pretty strange issues, where perfectly valid use cases
would print a "Too many packets in the demuxer packet queue..." message.
2013-08-22 21:19:40 +02:00