lavd/alsa: fix timestamp calculation

Current implementation didn't include duration of
last processed packet.
Device may return negative timestamps without
this correction.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavd/alsa: add stream validation

Don't trust provided streams.
Return with error when stream count is not 1 or
provided stream is not an audio stream.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavf/wavenc: check for a single stream.

Fix trac ticket #3110.
lavd/lavfi: support unknown channel layouts.
lavfi/avfiltergraph: suggest a solution when format selection fails.

Format selection can fail if unknown channel layouts are used
with filters that do not support it.
lavfi/avfiltergraph: do not reduce incompatible lists.

A list of "all channel layouts" but not "all channel counts"
can not be reduced to a single unknown channel count.
lavfi: parsing helper for unknown channel layouts.

Make ff_parse_channel_layout() accept unknown layouts too.
lswr: fix assert failure on unknown layouts.
lavfi/af_pan: support unknown layouts on output.
lavfi/af_pan: support unknown layouts on input.

Fix trac ticket #2899.
rtmpproto: Reorder conditions to help dead code elimination

This makes sure that these branches are eliminated properly
with clang with optimizations disabled.
lavc: drop deprecated audio_convert API at the next major bump

Also make AVCODEC_RESAMPLE API removal depends on its presence, since its
code depends on it as well.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
lavc/version.h: remove empty line
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmpproto: Reorder conditions to help dead code elimination

See: 23e9e5c7d9048cb463c4de9e518994aa5d651445
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cigaes/master'

* cigaes/master:
  lavfi/af_pan: support unknown layouts on input.
  lavfi/af_pan: support unknown layouts on output.
  lswr: fix assert failure on unknown layouts.
  lavfi: parsing helper for unknown channel layouts.
  lavfi/avfiltergraph: do not reduce incompatible lists.
  lavfi/avfiltergraph: suggest a solution when format selection fails.
  lavd/lavfi: support unknown channel layouts.
  lavf/wavenc: check for a single stream.
  lavd/alsa: add stream validation
  lavd/alsa: fix timestamp calculation

Merged-by: Michael Niedermayer <michaelni@gmx.at>