avformat/mpegts: Do not add pid if its already there with add_pid_to_pmt()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Leave skip_clear enabled until after estimate_timings()

Should make no difference but will be needed for subsequent commits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: Continue parsing PMTs during duration estimation

This way if we by chance run into a valid PMT we have a more complete
set of streams, also do not reset streams in case we run into a worse
PMT

Fixes Ticket4046

alternatively Ticket4046 could be closed as invalid or wontfix as it contains
some PMTs which lack the 2 subtitle streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtmpproto: Do not fail when the length cannot be determined for live streams

Fixes Ticket4071

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: also print PMT version in av_dlog()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
id3v2: prefer TDRC for date over TDRL.

TDRL is what we used as a replacement of TYER, and, according to
http://id3.org/id3v2.4.0-changes :
    TYER - Year
        This frame is replaced by the TDRC frame, 'Recording time'
        [F:4.2.5].
So change TDRL usages to TDRC.

Fixes ticket #3694

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
aacsbr: change order of operation to prevent out of array read

CC: libav-stable@libav.org
Bug-Id: CID 732250
aacdec: add default case in channel layout

Bug-Id: CID 732291
swresample: Fix swr_drop_output so it does not flush the buffers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/af_aresample: split flushing code out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/af_aresample: Limit data per inserted packet

This avoids creating unwieldy large packets, which is allowed but
does not seem to be a good idea

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: fix iteration count in add_pid_to_pmt()

Fixes accessing uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt: store canvas size in decoder context

Fixes canvas size
Fixes Ticket4074

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '351d0f8b7a6ecce411ae75fb3511573c34317218'

* commit '351d0f8b7a6ecce411ae75fb3511573c34317218':
  get_bits: remove unused assignment

Conflicts:
	libavcodec/get_bits.h

See: ea6178fff8ee0ccf145a2cbd5ab3c1bf73cd03d2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '240b22afe14ef477da1b439b9ed7bca6cc7d6c26'

* commit '240b22afe14ef477da1b439b9ed7bca6cc7d6c26':
  motion_est: remove dead code

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

* commit 'c442190a6bfd8036f6c32b78e1e96ff3b830f8f0':
  error_resilience: initialize prev_* variables

Note, these variables are not used without initialization prior
to the change

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

* commit 'f52b8717617e94da90a45afdfff23e94f9ecf35c':
  celp_filters: don't use filter lenght as loop bound

See: 3f010421421ff0af916cf16313a111dae71f837d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '9f6f407463ff8b7681befd04b6655bb7c6d9b3e1'

* commit '9f6f407463ff8b7681befd04b6655bb7c6d9b3e1':
  aacsbr: treat 1-d arrays as such

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '930ffd46e1e742674aa7cc1c2450020c63b5015b'

* commit '930ffd46e1e742674aa7cc1c2450020c63b5015b':
  aacsbr: change order of operation to prevent out of array read

Conflicts:
	libavcodec/aacsbr.c

See: c2340831b8e9032716acb0aab4893d3cc500213a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
hwaccel: Deinitialize hardware acceleration early enough

The application will destroy the underlying hardware handles when
get_format() gets called again. Also this ensures the
deinitialization takes place if the get_format callback returns an
error.

Regression from 1c80c9d7ef809180042257200c7b5f6b81d0b0e2.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>