lavd: Use av_gettime_relative()
authorOlivier Langlois <olivier@trillion01.com>
Mon, 12 May 2014 20:26:36 +0000 (16:26 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 18 May 2014 14:10:12 +0000 (16:10 +0200)
commit0a150670476bc8c38df7add4c59826bff73c204e
treed6c414f6c63a0fd329ee956895cce338b3f9ff08
parent6e8fe448154e1aa0928cb0d2e1aecb7255c751cc
lavd: 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.

Since v4l2 is compiled only on Linux where av_gettime_relative()
is monotonic, a small wrapper function av_gettime_monotonic() is used
(should be inlined the compiler) to put emphasis on that fact.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/v4l2.c