vo_opengl: fix shader

Regression since commit f14722a4. For some reason, this worked on
nvidia, but rightfully failed on mesa.

At least in C, the ## operator indeed needs two macro arguments, and
you can't just concatenate with non-arguments.

This change will most likely fix it.

CC: @bjin
vo_opengl: don't pass (char*)NULL as %s printf argument

glGetString(GL_SHADING_LANGUAGE_VERSION) can return NULL; I suppose this
happens on legacy OpenGL, while all the other fields are guaranteed to
exist.
player: don't sort a NULL list

This can occur if the directory does not have any files in it which
causes files to never be non-NULL for qsort.
player: simplify chapter display name code

The display name is always recomputed, so we can always toss the input
name.
tv: initialize frequencies to 0
posix: use STD*_FILENO constants

Rather than "magic" numbers, use meaningful constant names provided by
unistd.h.
audio: restore old speed change behavior

Don't attempt to resync after speed changes. Note that most other cases
of audio reinit (like switching tracks etc.) still resync, but other
code paths take care of setting the audio_status accordingly.

This restores the old behavior of not trying to fix audio desync, which
was probably changed with commit 261506e3.

Note that the code as of now wasn't even entirely correct, since the A/V
sync values are slightly shifted. The dsync depends on the audio buffer
size, so a larger buffer size will show more extreme desync. Also see
mplayer2 commit 213a224e, which should fixed this - it was not merged
into mpv, because it disabled audio for too long, resulting in a worse
user experience. This is similar to the issue this commit attempts to
fix.

Fixes: #1042 (probably)
CC: @mpv-player-stable
player: update cache state only if requested

Add a mechanism to the client API code, which allows the player core to
query whether a client API event is needed at all. Use it for the cache
update.

In this case, this is probably a pure microoptimization; but the
mechanism will be useful for other things too.
command: export demuxer cache info properties
options: more detailed output for --vf-... error message
command: remove extra space

Signed-off-by: wm4 <wm4@nowhere>
stream: tweaks to network reconnection code

Don't reconnect to the cache (since the cached stream already handles
reconnection). This is necessary, because since commit 0b428e44 the
"streaming" field (which also controls whether attempting to reconnect
makes sense at all) is inherited to the cache stream wrapper.

Also, let the stream reset its own position on reconnect. This removes
some assumptions and messy handling from the reconnect function.

Make sure the cache is dropped on reconnect. This takes care of
readjusting the stream position if necessary. (Also drop the cache on
DVB channel switching commands.)
bstr: preparation for next commit

Just so I can move this file without modifying its contents in the next
commit.

compat/compiler.h is to be moved to osdep/ with the next commit, so add
a dummy header.
Move compat/ and bstr/ directory contents somewhere else

bstr.c doesn't really deserve its own directory, and compat had just
a few files, most of which may as well be in osdep. There isn't really
any justification for these extra directories, so get rid of them.

The compat/libav.h was empty - just delete it. We changed our approach
to API compatibility, and will likely not need it anymore.
player: fix quit handling when seeking past EOF while paused

The player didn't quit when seeking past EOF in audio-only mode while
paused. The only case when we don't want to quit is when the last video
frame is displayed while paused.

This logic was probably broken a while ago, but I'm not exactly sure.

CC: @mpv-player/stable
TOOLS/youtube-dl_mpv: allow playing multiple URLs

Unfortunately this also means you can't pass extra mpv options after the
URL anymore. You can prefix the script with MPV='mpv --options' though.
vo_opengl: remove macro operator from shader

Removes '##' operator from OpenGL shader code.
manpage: fix minor grammar issue
gl_wayland: fix crash after eglInitialze failed

Only execute most of the opengl termination procedure if we actually have an
egl context.
demux_disc: handle new_sh_stream() fail correctly

Break the cycle on fail. Old code was checking if sh is NULL after
accessing it's fields.