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: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure: make sure pkg-config flags are populated in FT test.
configure: make vp9 decoder select the parser.

The parser is needed. FATE breaks if not present.
lavf: 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: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '584f88409062f7a134e7391887899e8e723ab6ff'

* commit '584f88409062f7a134e7391887899e8e723ab6ff':
  riff: Pass block_align to estimate frame duration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
ffplay: 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: Olivier Langlois <olivier@trillion01.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/aviobuf/ff_get_line: also accept \r as end of line character

Fixes Ticket3108

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtpenc: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/nutenc: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mp3enc: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/matroskaenc: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mmf: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/framehash: switch to AVFMT_FLAG_BITEXACT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc: remove the locking code in avcodec_close()

This function should not modify any global state, so there should be no
reason for any locking.
lavc: add avcodec_free_context().

Right now, the caller has to manually manage some allocated
AVCodecContext fields, like extradata or subtitle_header. This is
fragile and prone to leaks, especially if we want to add more such
fields in the future.

The only reason for this behaviour is so that the AVStream codec context
can be reused for decoding. Such reuse is discouraged anyway, so this
commit is the first step to deprecating it.
4xm: allocate extradata properly.

Pad it with the required amount of zeros, check for malloc failure.
a64: remove unneeded struct qualifier
a64: check that extradata exists before reading from it
yuv4mpeg: split the demuxer and muxer into separate files