mpegtsenc: use AVERROR() for return codes

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
mpegtsenc: use AVFormatContext for AAC packetization

This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
adtsenc: Don't expose the muxer internals to the rest of lavf

This isn't required any longer, when the mpegts muxer uses it
as a proper chained muxer.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
mpegtsenc: Support LATM packetization for AAC

This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
aacsbr: optimize sine level addition

Based-on commit by Måns Rullgård <mans@mansr.com>

original:   1424 decicycles in phi, 1024 runs, 0 skips
mans code:  1104 decicycles in phi, 1024 runs, 0 skips
this change: 734 decicycles in phi, 1024 runs, 0 skips

mans code:   1 file changed, 20 insertions(+), 10 deletions(-)
this change: 1 file changed, 10 insertions(+), 6 deletions(-)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
aacsbr: remove unused variables
configure: add --enable/disable-random option

This allows creating random configurations which is useful for
testing purposes.

Signed-off-by: Mans Rullgard <mans@mansr.com>

Conflicts:

	configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpegtsenc: Support LATM packetization for AAC
  adtsenc: Don't expose the muxer internals to the rest of lavf
  mpegtsenc: use AVFormatContext for AAC packetization
  mpegtsenc: use AVERROR() for return codes

Conflicts:
	libavformat/adts.h
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
flv: support stream text data as onTextData

Adobe specifies onTextData as the standard message to use to deliver
text information.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mpegts_audio_write: fix potential integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegtsenc: zero pointers after freeing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
af_astreamsync: set samples rate in query_formats.
af_amerge: use the buferqueue API.
avpacket: fix duplicating side data.

Use correct side data size instead of just zeroed field.
Unconditionally compile init_stream() in bintext.

Fixes compilation of xbin, adf and idf demuxer if
bintext demuxer was disabled.

Fixes ticket #1399
h263: disable loop filter with lowres

Fixes ticket1212

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mace: check channel count, fixes FPE

Fixes ticket1391

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
bmv: add stricter checks for invalid decoded length

This makes decoder handle random data passed as BMV frame data.
librtmp: add rtmp_app and rtmp_playpath private options.

This makes it easier to switch between native rtmp and librtmp.
librtmp: don't abuse a variable for two unrelated things.