options.rst: correct broken URL
w32_common: capture mouse input

Mouse buttons can get stuck down if the button is pressed inside the
video window and released outside. Avoid this by capturing mouse input
when a button is pressed.
w32_common: prevent MOUSE_BTN0 sticking after drag

The window doesn't recieve a WM_LBUTTONUP message after it's dragged,
probably because it's swallowed by the modal loop. To stop the button
from sticking, release it manually when the drag is complete.
DOCS: add coding style

I've tried not to be too detailed (because it's not a reference, just
some guidelines), but it still got relatively long. Also contains
conventions for sending patches.
README: split list of dependencies

And make some additions.

I'm not really sure why we list dependencies that are not ours, but that
of external libraries. Still might be useful, though.
DOCS/coding-style: add an example and another rule
player/main: Fix Cygwin build

Xlib.h (included from x11_common.h) defines a macro 'Status' as 'int'.
This messed up a bunch of definitions in windows.h and broke the build
in Cygwin. Including windows.h first seems to solve the problem.

This commit also removes the definition of an unused flag.

Conflicts:
	player/main.c
build: fix unicode handling of the version string

Don't pass unicode types to waf ENV.
As per https://code.google.com/p/waf/issues/detail?id=1420
This directly fixes the "CFVersion" key in the .app bundle plist.
manpage: af: minor syntax improvements

Conflicts:
	DOCS/man/en/af.rst
options: fix off-by-1 error in option help output
DOCS/coding-style: add another requirement for commit messages
vd_lavc: ridiculous workaround for Libav 9 compatibility

This "sometimes" crashed when seeking. The fault apparently lies in
libavcodec: the decoder returns an unreferenced frame! This is
completely insane, but somehow I'm apparently still expected to
work this around. As a reaction, I will drop Libav 9 support in the
next commit. (While this commit will go into release/0.3.)
manpage: clarify what to pass to --hwdec-codecs option
stream_bluray: fix for significant memory leak

It's obvious but, since STREAM_CTRL_GET_TIME_LENGTH is called
frequently, the amount of leaked memory here is quite big.
dvdnav: prevent reallocation of fake highlight buffer

Since subsizes were never updated, the bitmap buffer was always
reallocated whenever mp_nav_get_highlight() called.
dvdnav: make MP_NAV_EVENT_RESET_ALL handled properly

dvdnav.c did not handle event in regular sequence. Usually this
does not make any trouble except around MP_NAV_EVENT_RESET_ALL.
Those events should be handled in regular sequence. If they're
mixed, it can make wrong result.
For instance, MP_NAV_EVENT_HIGHLIGHT right after
MP_NAV_EVENT_RESET_ALL should not be ignored but it might be
because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd
hidden.
dvdnav: fix minor memory leak

This was usually handled at the end of the switch statement, so if
something returns from the function before that, the event has to be
freed explicitly.
stream_cdda: report track times

Report the time for each chapter (tracks are treated as chapters). This
allows us to get rid of the "old" chapter mechanism, and also behaves
better with the frontend.

This makes assumptions about the audio formats, but that format is
hardcoded anyway in the rawaudio demuxer defaults (and always was).
stream_cdda: fix track time accuracy

Don't use an integer division to get the time, since that would round on
second boundaries. Also round up the time by sector size. Seeking rounds
down due to alignment constraints, but if we round up the time, we can
make it land on the exact destination sector.

This fixes that the track change code printed the previous track when
seeking by chapter.
stream_cdda: remove unused stuff

This cd_info_t struct was practically unused. The only thing it did was
storing the track name of the form "Track %d" in a very roundabout way.
Remove it. (It made more sense when there was still CDDB support.)