demux_playlist: detect headerless m3u files by extension

m3u files are normally just text files with a list of filenames. Nothing
actually mandates that there is a header. Until now, we've rejected such
files, because there's absolutely no way to detect them.

If nothing else claims the file, the extension is ".m3u", and if the
contents of the file look like text, then load it as m3u playlist. The
text heuristic is pretty cheap, but at least it should prevent trying
to load binary data as playlist. (Which would "work", but result in a
catastrophic user experience.)

Due to the text heuristic, UTF-16/32 files will be rejected (unless they
have a header), but I don't care.
demux: silence unseekable message

This message was added in commit a0acb6ea. But it showed up in all sorts
of inappropriate contexts, such as when opening m3u from an unseekable
http URL, or playing DVDs. So I guess this didn't work out. Disabling it
again.
vaapi/GLX: remove a direct reference to an GL symbol

Instead go through our function loader.
vo_opengl: extend filter size to 32

Also replace the weights calculations for 8/12/16 with the generic
weight function definition macro. (The weights 2/4/6 follow slightly
different rules.)
vo_opengl: disable fancy-downscaling for opengl-hq again

Seems it's actually buggy, beyond the problem that large filter sizes
are required.
demux_playlist: fix negated condition

Fuck.
cocoa: don't change app activation policy in libmpv

/cc @mpv-player/stable
demux_mkv: reject 0 TimecodeScale

Also reject anything over INT_MAX; no particular reason for this upper
bound.

Fixes #1317.
cocoa: use --idle when running inside bundle

Previously when using the bundle we used a custom bizarro thing to wait for
events. Just use `--idle` and greatly simplify the code.
af_hrtf: Fix out-of-range read.

Based on patch by Yuriy Kaminskiy [yumkam gmail].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37330 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: wm4 <wm4@nowhere>
cocoa: fix view leak in uninit when fullscreen
vo_opengl: clamp filters to their size

This gives better results with fancy-downscaling. The issue here is that
fancy-downscalign "extends" the filter radius by some amount, which
requires using a larger filter size and shader. Then most of the filter
is "unused", but some filters still return non-0 coefficients, which
create heavy artifacts. Just clamp them off.

I'm not sure if this is the right solution, but at least it's better
than before.
vo_opengl: extend filter size to 64

For better downscaling.

Maybe the list of filter sizes shouldn't be static...
player: when seeking past EOF with --keep-open, seek to last frame

It feels strange that seeking past EOF with --keep-open actually leaves
the player at a random position. You can't even unpause, because the
demuxer is in the EOF state, and what you see on screen is just what was
around before the seek.

Improve this by attempting to seek to the last video frame if EOF
happens. We explicitly don't do this if EOF was reached normally to
increase robustness (if the VO got a frame since the last seek, it
obviously means we had normal playback before EOF).

If an error happens when trying to find the last frame (such as not
actually finding a last frame because e.g. the demuxer misbehaves), this
will probably turn your CPU into a heater. There is no logic to prevent
reinitiating the last-frame search if the last-frame search reached EOF.
(Pausing usually prevents that EOF is reached again after a successful
last-frame search.)

Fixes #819.
sub: remove assertion

This should clearly be impossible, but it seems to happen with ordered
chapters for a user.

Since I can't tell what the actual bug is and it seems impossible to
know the details without downloading possibly huge files, this is
probably the best we can do.

Should at least partially fix #1319.
options: add a 'once' idle mode

This allows to make mpv wait for file open events at start but close
after it is done playing the first playlist.
cocoa: bundle: use idle=once
cocoa: ignore first file open events from command line

similar to some of the code deleted in 685b8b7a but simpler
DOCS: Improve documentation of --ytdl-format option

As suggested in #1321
w32_common: ensure taskbar is hidden when fullscreen

Windows uses a heuristic to determine if a window should appear
fullscreen. If the active window's client area covers the whole screen,
the taskbar should move to the bottom of the Z-order, allowing the
window to show through.

Unfortunately, sometimes it doesn't work and the taskbar stays on top of
the "fullscreen" window. ITaskbarList2->MarkFullscreenWindow explicitly
tells the shell that a window wants to be fullscreen, so the taskbar is
always at the bottom of the Z-order while the marked window is active.

This might help with #999. Firefox also uses this interface to fix
fullscreen issues.