The supplementary audio descriptor is defined in ETSI EN 300 468 and
provides more details regarding accessibility audio tracks, especially
the normative annex J contains a detailed description of its use.
Its language code (if present) overrides the language code of an also
present ISO 639 language descriptor.
Note that this also changes the priority of multiple descriptors with
language from "the last descriptor with language within the ES loop" to
"specific descriptor over general ISO 639 descriptor".
Signed-off-by: Aman Gupta <aman@tmm1.net>
It is negative, so can't be used for left shifting.
This fixes ubsan runtime error: shift exponent -1 is negative
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
It is supposed to be a flag. The only currently defined value is
AVIO_SEEKABLE_NORMAL, but other ones may be added in the future.
However all the current lavf code treats this field as a bool (mainly
for historical reasons).
Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
this removes the need to probe to discover aac streams
inside mpegts containers, thus speeding up initial playback.
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '74d98d1b0e0e7af444c933ea3c472494de3ce6f2':
mpegts: Validate the SL Packet Header Configuration
See e630ca5111
Our local timestamp_len > 64 is adjusted to > 63 to match the Libav
check and the actual specifications (14496-1, 10.2.2).
There is no need to request a sample as it violates the specifications
and such a file would likely be the result of a crafted/fuzzed sample.
On the other hand, the clipping of the value is kept for extra safety.
Merged-by: Clément Bœsch <clement@stupeflix.com>
This allows to copy information related to the stream ID from the demuxer
to the muxer, thus allowing for example to retain information related to
synchronous and asynchronous KLV data packets. This information is used
in the muxer when remuxing to distinguish the two kind of packets (if the
information is lacking, data packets are considered synchronous).
The fate reference changes are due to the use of
av_packet_merge_side_data(), which increases the size of the output
packet size, since side data is merged into the packet data.
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
Note that this slightly changes behavior: it sets AVMEDIA_TYPE_UNKNOWN
if the codec type is unknown. This should be ok.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
PES header size is 6 bytes (00 00 01 bf XX XX), not 0.
BluRay text subtitles use private stream 2.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>