Commit Graph
35854 Commits
Author SHA1 Message Date
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 v0.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 v0.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 v0.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
wm4 0440561c99 demux_raw: read multiple frames per packet
The rawaudio demuxer read one frame per packet, basically a few bytes,
which caused insane overhead. (I found this when I couldn't play raw
audio without dropouts when using -v, which printed a line per packet
read.)

Fix this and read 1 second of audio per packet. This is a regression
since cfa5712 (merging of demux_rawaudio and demux_rawvideo).
2013-08-22 21:19:34 +02:00
Stefano Pigozzi 2a172a98fd cocoa_common: fix window positioning with --geometry
Regression since ff3b98d11c. The window positioning code relied on the
visibleFrame's height without taking into account the dock's presence.

Also moved the constraining code to the proper method that overrides the
original NSWindow behaviour. This avoids having to check for border since the
constraining is performed by Cocoa only for titled windows.

Fixes #190
2013-08-22 21:19:20 +02:00
Cheng Sun 421eebc8f1 manpage: fix (again) incorrect ao_alsa example
One example in ao.rst used the old syntax with misspelling of "no-block".
2013-08-22 21:19:12 +02:00
wm4 ab3bafc750 vf_eq: fix behavior when changing parameters
Using -vf eq and changing brightness, contrast, etc. using key bindings
with e.g. "add brightness 1" didn't work well: with step width 1, the
property gets easily "stuck". This is a rounding problem: e.g. setting
gamma to 3 would actually make it report that gamma is set to 2, so
the "add" command will obviously never reach 3 with a step width of 1.
Fix this by storing the parameters as integers.

This was broken in cac7702. This commit effectively changed these
properties to use the value as reported by vf_eq, instead of the
previously set value for the "add" command. This was more robust,
but not very correct either, so we keep the new behavior and make
vf_eq report its parameters more accurately.
2013-08-22 21:19:08 +02:00
wm4 d3f7248ca9 m_option: make "add speed 0.1" command work
Was broken since the speed property was switched from float to double.
2013-08-19 22:33:39 +02:00
wm4 463b877ec0 Release 0.1.2 v0.1.2 2013-08-19 01:12:43 +02:00
wm4 72c81aa111 vdpau: don't try to match codec profiles
Instead, do what MPlayer did all these years. It worked for them, so
there's probably no reason to change this.

Apparently fixes playback with some files, where the VDPAU decoder does
not formally support a profile, but decoding works with a more powerful
profile anyway.

Though note that MPlayer did this because it couldn't do it in a better
way (no decoder reported profiles available when creating the VDPAU
decoder), so it's not entirely clear whether this is a good idea. An
alterbative implementation might try to map the profiles exactly, and
do some fall backs if the exact profile is not available. But this
hack-solution works too.

Conflicts:
	video/decode/vdpau.c
2013-08-19 01:09:39 +02:00
wm4 9f7c014930 changes: add some things for completeness 2013-08-19 01:07:32 +02:00
wm4 97eddff865 vo_vdpau: fix screenshots if panscan is used
When panscan was used, i.e. the video is cropped to make the video fill
the screen if video and screen aspects don't match, screenshots
contained only the visible region of the source video, stretched to
original video size.
2013-08-18 05:58:33 +02:00
wm4 cf880b9070 mplayer: don't make restored options from quit_watch_later per-file local
Consider:

    mpv file1.mkv file2.mkv

and file1.mkv is restored from an earlier session when quit_watch_later
was used. Then all restored options were reset when file2.mkv is played,
even if the user changed them during playback. This affects for example
the fullscreen setting.

Make it so that after finishing a resumed file, the previously restored
settings are not reset again. (Which means only resuming will forcefully
overwrite the settings.)
2013-08-18 05:58:28 +02:00
wm4 3478575419 manpage: fix incorrect ao_alsa example, extend changes.rst
One example in ao.rst used the old syntax with mangled device names.
Fix it. Mention some shell related caveats. Explicitly mention the
change of device name syntax in changes.rst, because it seems to be
a common issue.
2013-08-15 23:46:18 +02:00
wm4 88a53309cd vdpau: fix compilation on Libav
Libav's <libavcodec/vdpau.h> header uses some libavocdec symbols without
forward-declaring them and without including the headers declaring them.
FFmpeg's header for this is fine.
2013-08-15 23:46:07 +02:00
wm4 da76eb9f14 sub: fix accidental subtitle overlaps
The fix_overlaps_and_gaps() function in dec_sub.c fixes small gaps or
overlaps between subtitle events. However, sometimes it could happen
that the corrected subtitle events could overlap by 1ms due to bad
rounding, making libass shift subtitles to reduce collisions. (The
second subtitle will be shown above the previous one, even if both
subtitles are visible only for 1ms.)

sd_ass.c rounds the timestamps when converting to integers for unknown
reasons. I think it would work fine without that rounding, but since
I have no clue why it rounds, and since it could be needed to ensure
correct timestamps with ASS subtitles demuxed from Matroska, I'd rather
not touch it. So the solution is to use already rounded timestamps to
calculate the new subtitle duration in fix_overlaps_and_gaps().

See github issue #182.
2013-08-15 23:43:36 +02:00
wm4 df6901b653 x11: fix --ontop
Apply it after mapping.
2013-08-15 23:43:33 +02:00
Stefano Pigozzi 53e4ba26b5 changes.rst: document some OSX and windows changes 2013-08-15 23:43:29 +02:00
wm4 f10a3cac0f demux: move demux_mf before demux_subreader
demux_subreader is quite aggressive, and sometimes detects random
strings in EXIF as subtitle text.
2013-08-15 23:43:11 +02:00
wm4 7370ad2120 demux_subreader: report what subtitle format has been found 2013-08-15 23:43:05 +02:00
Noble Huang ed2d819ea5 stream_bluray: fix bd:// url segfault introduced by commit bc1d61 2013-08-15 23:43:00 +02:00
wm4 4f728cfb99 Add VERSION for release
No idea what the correct workflow is for these things. In any case, we
somehow have to make the github release system to include the correct
version in its tarball. I don't think you can provide your own tarballs
either, so it has to be in git.
v0.1.1
2013-08-12 00:18:22 +02:00
wm4 cdf4b7d2ee x11_common: get hack for Motif Window Manager out of the way
Disable the hack by default, because it's interfering with some more
modern WMs. MWM (Motif Window Manager) is probably pretty dead, but
we still allow enabling the old hack with "--fstype=mwm_hack".

See github issue #179.
2013-08-11 23:59:18 +02:00