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.
* commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1':
Remove stray line breaks from avpriv_{report_missing_feature|request_samples}
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* commit 'bfeb83a8b7d3fcf09a54d8dbc9c521e10bb17530':
rtpdec_hevc: Drop extra sanity check for size of input packet
Merged-by: Michael Niedermayer <michaelni@gmx.at>
In this case len is always at least 3, since it is checked against
RTP_HEVC_PAYLOAD_HEADER_SIZE + 1 before entering the switch block.
Bug-Id: CID 1238784
* commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15':
rtpdec_hevc: Share the implementation of fragmented packets with h264
Conflicts:
libavformat/rtpdec_h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f3449062a8d100ac4f703647336c32b126aa99f1':
rtpdec_hevc: Reduce indentation level by returning early on errors
Conflicts:
libavformat/rtpdec_hevc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0':
rtpdec_hevc: Share the implementation of parsing a=framesize with h264
Conflicts:
libavformat/rtpdec_h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5956f489d0452ff6dea6b6b81b4fa8e596fc5684':
rtpdec_hevc: Add asterisks at the start of each long comment line
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8':
rtpdec: Get rid of all trivial .alloc/.free functions
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '10e2d8b5562d8729e4eefbcec63a11eb8a0c502c':
rtpdec_hevc: Use a shared function for parsing parameter sets
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ced7238cd01cc2199acf9225305628641a27c1d7':
rtpdec_hevc: Use av_realloc instead of av_malloc+memcpy
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '9b7f932ee568cadfc0f556a061fcc00cb63f9780':
rtpdec_hevc: Parse out of band vps/sps/pps/sei from fmtp lines
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'c463dfc7e49929a9891884312b23b27d14729c51':
rtpdec_hevc: Drop a duplicated, nonstandard entry
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The RFC spec draft only specifies the "H265" name - there is no
specification saying how to interpret "HEVC" (if such a packet
format is specified it could be an entirely different format).
Since this is a very new standard (still a draft), there is little
need for compatibility with existing, broken implementations. Therefore
remove the extra alias, to avoid the risk of encouraging incorrect
usage.
Intentionally keeping the ff_hevc_dynamic_handler name for the
handler, to use "hevc" consistently as name for the codec instead
of "h265" within the library internals as long as there only is one
single variant in actual use.
Signed-off-by: Martin Storsjö <martin@martin.st>