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.
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 'f792d3cbb8e8e35c54a9358a55dd596b7a40f228':
lavf: add the notimestamps flag to the muxers missing it
Conflicts:
libavformat/adtsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Also check number of streams and give error message why muxing failed.
This prevents muxing unsupported codec with known and supported tag.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
* commit 'c88d245c9866e48cb8a238b7564964c1fcf3315f':
au: use ff_raw_write_packet()
au: set stream start time and packet durations
Conflicts:
libavformat/au.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'af68a2baae6761044cbed95575e8bcfebf55c6f1':
au: use %u when printing id and channels since they are unsigned
au: validate sample rate
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'c837b38dd33a11c3810e988a60193a858eb4f58c':
au: move skipping of unused data to before parameter validation
au: do not arbitrarily limit channel count
Conflicts:
libavformat/au.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '9a7b56883d1333cdfcdf0fa7584a333841b86114':
au: set bit rate
au: validate bits-per-sample separately from codec tag
rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT
Conflicts:
libavformat/au.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'c35f0e8495e34c2082dcde805e9323c9f6a4cb0a':
au: Reorder code so that both muxer and demuxer are under #ifdefs
fate: Move RALF test into lossless audio group
cosmetics: Use consistent names for multiple inclusion guards.
Conflicts:
libavformat/au.c
tests/fate/lossless-audio.mak
tests/fate/real.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>