idcin: fix return check

CC: libav-stable@libav.org
Bug-Id: CID 732198
avio: fix sizeof argument

CC: libav-stable@libav.org
Bug-Id: CID 732284
aviobuf: check context before using it

Avoid a possible null pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CID 1135769
wtv: check seek_by_sector return value

CC: libav-stable@libav.org
Bug-Id: CID 1198258
wtv: clean memory on error

CC: libav-stable@libav.org
Bug-Id: CID 718002
vf_format: check input validity

CC: libav-stable@libav.org
rtmpproto: remove dead code

Expression already evaluated before, redundant since
053386864219eccbcca1886c55f902f9555428a5.

Bug-Id: CID 732199
rtpdec_hevc: drop unnecessary check

len is always >=1 in that case.

Bug-Id: CID 1238784
nutdec: Prevent a memory corruption

Chapters do not have an event_flags field.

Bug-Id: CID 1231990
rtpproto: Free the addrinfo pointer on failure

CC: libav-stable@libav.org
Bug-Id: CID 1238797
fate-mpeg4: use TARGET_SAMPLES for resize tests
smoothstreamingenc: explict cast to avoid overflow

CC: libav-stable@libav.org
Bug-Id: CID 732248
flvdec: avoid unitialized use of a struct member

CC: libav-stable@libav.org
Bug-Id: CID 718141
flvdec: make sure to check create_stream and report the same error

CC: libav-stable@libav.org
Bug-Id: CID 732242
rmdec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 733714
rmdec: stricter error check to avoid theoretical unitialized use

CC: libav-stable@libav.org
Bug-Id: CID 90558
nutenc: check for negative index rather than assert

CC: libav-stable@libav.org
Bug-Id: CID 703721
nutdec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 733713
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>