lavf/matroskaenc: Check for valid metadata before creating tags

Tags must have at least one SimpleTag element to be spec conformant.
Updated lavf-mkv and seek-lavf-mkv FATE references as the tests were affected by
this.

Fixes ticket #2785

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 088ed5314694031e07e02e9d364c9d486a60e704)

Conflicts:
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv
matroskaenc: simplify mkv_check_tag()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 066111bf19518a9f4d836991b34dbfc5ab72a41a)
matroskadec: Improve TTA duration calculation

Calculate the duration as accurately as possible to improve decoding of samples
where the last frame is smaller than the rest.

Signed-off-by: James Almer <jamrial@gmail.com>
Approved-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit af248fa1174200acb537a6ab1198bb2fed38e884)

Conflicts:
	libavformat/matroskadec.c
avformat/matroskadec: check out_samplerate before using it in av_rescale()

Prevent assertion failure with damaged input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 338f8b2eaf36f078eb5cc26ac10e651dc4c48243)
matroska_read_seek: Fix used streams for subtitle index compensation

Might fix Ticket1907 (I have no testcase so i cant test)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4758e32a6c48044f77102a49110c79b4f338f648)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/encoders: Add documentation for libmp3lame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4703a345fb41b14fe28f7e6bf7f60bb2213aa9e0)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/encoders: Add libvo-aacenc doc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ba7cb4807f050c401f8fd7ef1d1065b138358135)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

Conflicts:
	doc/encoders.texi
doc/encoders: Add libvo-amrwbenc doc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ec65aa1046a4417d5c7dfcf8faeecde60e3fe00)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

Conflicts:
	doc/encoders.texi
doc/decoders: Document libcelt

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e3580449221c79cf611995dc7e2fcb61dd867d4c)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/encoders: Add libopencore-amrnb doc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9ead06057acfcc43bcb99a63a7c58543007b2847)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/decoders: Document libgsm decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c16496c3770fa083472ab86146c18dc96c1feea7)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/decoders: Document libilbc decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8cdea50f6eee1271e24ff0c9590522f8323e87fe)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/decoders: Document libopencore-amrnb decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b43860ee0c27279f2fa020ea965c03d359f8f45c)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/decoders: Add libopencore-amrwb decoder doc

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 83647ace735d1707d4b28345ef77fefe525ea52e)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/encoders: alphabetically list the encoders

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 934df3b0375743ae2b03168a4174edb9f88a6889)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

Conflicts:
	doc/encoders.texi
doc/muxers: Add AIFF doc

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 4ec46b1160eb549a551823c168905b43922add31)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/encoders: add libxvid doc

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 6b255e5e70c72aa59ff7aed74b4ee976223eb140)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

Conflicts:
	doc/encoders.texi
doc/encoders: Remove reference to "Codec Options" chapter

The chapter is only presented in later release branches.
(cherry picked from commit 7364109d255ff5583c9a3930830e28f5b1f0adce)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/texi2pod: add "use warnings" directive

The script was previously run with perl -w through the shebang
command. Now that the script is executed through direct perl invocation
the -w in the shebang command is ignored. This patch re-enables "use
warnings" whatever way the script is invoked.

Idea-By: jamal <jamrial@gmail.com>
(cherry picked from commit 3239382aefd0f5fa9ffd1509ccaedd59a54ec9af)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
doc/texi2pod.pl: drop unnecessary rule, which was converting "\," to ","

I cannot find a reason for such a rule, which was resulting in badly
escaped filtergraph snippets.

Fix trac ticket #1610.
(cherry picked from commit ce875a613a16b06b0a561774955111f7a24d12bb)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>