Removing the /EXPERIMENTAL suffix for codec id field for Opus. Doing this
as the implementation of embedding Opus in Matroska is complete.
Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + FF_INPUT_BUFFER_PADDING_SIZE won't overflow.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
The seektable is required for filling in ape->frames[i].pos
further down.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
The caller does not expect this, and in case of adding new streams would then
not even be able to deallocate them anymore.
This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The caller does not expect this and there are variables left that index to otherwise
deallocated data.
This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Implementing support for end trimming Opus in Matroska by making
use of the DiscardPadding value from the container and discarding
the samples accordingly.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In order to represent the codec delay accurately in Matroska, a
new element CodecDelay has been introduced. It contains the
overall delay added by the codec in nanoseconds. This patch adds
support for muxing CodecDelay value in the container.
Matroska spec for CodecDelay element can be found here:
http://matroska.org/technical/specs/index.html#CodecDelay
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Support for end trimming Opus in Matroska is implemented by using
the DiscardPadding container element in the Block data. The last
chunk is stored as a Block instead of SimpleBlock and the
trimming information is stored and used to discard samples that
were padded by the Opus codec. This patch adds support for muxing
DiscardPadding element into the container with appropriate value.
Matroska spec for the DiscardPadding element can be found here:
http://matroska.org/technical/specs/index.html#DiscardPadding
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This makes sure the faststart vs fragmentation check works as
intended when fragmentation is enabled due to using the ismv mode.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes warnings about making integers from pointers without
a cast, and avoids the theoretical case where the lower 32 bits of
the pointer would all be zero where the implicit cast wouldn't give
the right result.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes a bunch of possible overread in avformat with the idiom p +=
strcspn(p, "\n") + 1 (strcspn() can focus on the trailing '\0' if no
'\n' is found, so the +1 leads to an overread).
Note on lavf/matroskaenc: no extra subtitles.o Makefile dependency is
added because only the header is required for ff_subtitles_next_line().
Note on lavf/mpsubdec: code gets slightly complex to avoid an infinite
loop in the probing since there is no more forced increment.