avformat/mpegts: add scan_all_pmts option

This allows selecting if the demuxer should consider all streams to be
found after the first PMT and add further streams during decoding or if it rather
should scan all that are within the analyze-duration and other limits

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: improve first valid PMT heuristic

This checks for audio+video instead of streams > 2
Fixes Ticket4090

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/aacenc: check input for NaN

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/aacdec: Skip processing channel elements which have not been present

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc: Compact the side-data passthrough
v4l2: Use av_strerror

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
avformat/librtmp: fix swfurl

Found-by: JULIAN GARDNER <joolzg@btinternet.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
v4l2: Preserve errno values

av_log usually resets it.
ffplay: implement separete audio decoder thread

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: fix indentation after last commit

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: only output null packet once on EOF

The generic decoder properly flushes the codecs with one null packet as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
avfilter/avf_showwaves: fix off by one error in loop condition

It caused segfaults.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc/options: fix shallow copy context

avcodec_copy_context leaves shallow copy of string/binary/dict options.
Double free/accessing freed memory may occur.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
lavu/opt: document av_opt_copy function
lavu/opt: copy dict in av_opt_copy

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Set -scan_all_pmts 1 in ffmpeg, ffplay and ffprobe if not set by user.

Fixes ticket #3762.
swscale: fix yuv2yuvX_8 assembly on x86

use_mmx_vfilter check/fix by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e3e317e0c015b164b6c2eb8913e393216d78de23'

* commit 'e3e317e0c015b164b6c2eb8913e393216d78de23':
  lavc: Compact the side-data passthrough

Conflicts:
	libavcodec/utils.c

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

* commit 'a1a259881fa7b23e2ffc0c2a43d4923fe42d0478':
  v4l2: Use av_strerror

Conflicts:
	libavdevice/v4l2.c

See: 60950adc18fe145a235211e75da68ab07123fcaa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '09f25533a564eab743f258d168697a11122914c4'

* commit '09f25533a564eab743f258d168697a11122914c4':
  v4l2: Preserve errno values

Conflicts:
	libavdevice/v4l2.c

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