Print an error if -r and -vsync 0 are used together.

Fixes ticket #4041.
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Print an error if -r and -vsync 0 are used together.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtsp: add av_assert0() to clarify that the else case is supposed to be unreachable

If its reachable then theres a bug as err would be uninitialized

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtsp: pass return code from ffurl_open() on its failure

Previously, AVERROR(EIO) was returned. Now the value is passed from
lower level, thus it is possible to distinguish ECONNREFUSED, ETIMEDOUT,
ENETUNREACH etc.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavu: Add av_gettime_relative

Since av_gettime() is used in a number of places where actual
real time clock is required, the monotonic clock introduced in
ebef9f5a5 would have consequences that are hard to handle. Instead
split it into a separate function that can be used in the cases
where only relative time is desired.

On platform where no monotonic clock is available, the difference
between the two av_gettime functions is not clear, and one could
mistakenly use the relative clock where an absolute one is
required. Therefore add an offset, to make it evident that the
time returned from av_gettime_relative never is actual current
real time, even though it is based on av_gettime.

Based on a patch by Olivier Langlois.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavc: Use av_gettime_relative

Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
tools: Use av_gettime_relative

Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
avplay: Use av_gettime_relative

Signed-off-by: Martin Storsjö <martin@martin.st>
avconv: Use av_gettime_relative

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5'

* commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5':
  lavu: Add av_gettime_relative

Conflicts:
	libavutil/time.c
	libavutil/time.h
	libavutil/version.h

See: 0eec06ed8747923faa6a98e474f224d922dc487d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '6fdf35fe35d8c1c467708238100648a7a47c930d'

* commit '6fdf35fe35d8c1c467708238100648a7a47c930d':
  lavc: Use av_gettime_relative

See: b052bccbe4b5533c3f11fddb14df59fb72dbf463
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e205429fcf9de3182bce2f4cfd1d6401596a8666'

* commit 'e205429fcf9de3182bce2f4cfd1d6401596a8666':
  tools: Use av_gettime_relative

See: 41120e6e40e34a840d194883a95c57a6e91b1093
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '248d8fb60c59c8e044d9c8f78f23383b7cdecf72'

* commit '248d8fb60c59c8e044d9c8f78f23383b7cdecf72':
  avplay: Use av_gettime_relative

Conflicts:
	ffplay.c

See: 0ca0b4c29cf750cbb15732cddbe16723a66afda8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'd0c093021943e9b9c23528b12cd61ca2a5b01b4f'

* commit 'd0c093021943e9b9c23528b12cd61ca2a5b01b4f':
  avconv: Use av_gettime_relative

Conflicts:
	ffmpeg.c

See: 76191c08f88fd66cf9198afc0c4a809c4c0336d4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Allow decoding of Go2Meeting version 5.