Andreas Rheinhardt
cd0ab3526d
avformat/g726: Deduplicate AVClasses
...
The child_class_next API relied on different (de)muxers to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
e4ee2a0629
avformat/flvdec: Deduplicate AVClasses
...
The child_class_next API relied on different (de)muxers to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
779dba0fc0
avformat/flacdec, takdec: Use FFRawDemuxerContext directly
...
The beginning of the private contexts of both the FLAC and the TAK
demuxer currently mimick FFRawDemuxerContext: A pointer to an AVClass
followed by the AVOpt-enabled field raw_packet_size. Said field is only
used by the demuxers' read_packet functions via
ff_raw_read_partial_packet(), which treats the private context as an
FFRaawDemuxerContext. Yet this is fragile, so better include a
FFRawDemuxerContext struct at the beginning of said demuxers' private
contexts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
cd564ee547
avformat/codec2: Remove unused AVClass with wrong category
...
The codec2 muxer has no options and so it needs no AVClass;
and it certainly needs no AVClass of category AV_CLASS_CATEGORY_DEMUXER.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
63ad9ba4b5
avformat/asfenc: Deduplicate AVClasses
...
The child_class_next API relied on different (de)muxers to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
c64cfef91e
avformat/aptxdec: Deduplicate AVClasses
...
The child_class_next API relied on different (de)muxers to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
41ab409332
avformat/Makefile: Remove rawdec dependency from aptx, codec2 demuxers
...
These demuxers don't need anything from rawdec; they furthermore only
used rawdec.h to include opt.h. Both of this has been fixed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
2c984ecbdd
avformat/Makefile: Add missing rawdec dependency for IPU demuxer
...
Needed for ff_raw_read_partial_packet and ff_raw_options.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
3da2f4502a
avformat/xmv: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
f545155eb3
avformat/webvttdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
d6d113e454
avformat/wc3movie: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
04aa4065d7
avformat/vplayerdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
21e40af378
avformat/vividas: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
c1141aa71a
avformat/vapoursynth: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
24e4127cb4
avformat/tiertexseq: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7ef252b64a
avformat/tedcaptionsdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
480094b2a6
avformat/subviewer1dec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
43ac74a7d8
avformat/subviewerdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
c6686388aa
avformat/stldec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
511bd6af47
avformat/srtdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
1ebda24904
avformat/sierravmd: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
5542f78d46
avformat/segafilm: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
9ef7582446
avformat/sccdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7ae7d93653
avformat/samidec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
48de45ea59
avformat/rmdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
5a58e58215
avformat/realtextdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
b00c9c74af
avformat/pp_bnk: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
ae123057a3
avformat/pjsdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
d2574262a5
avformat/paf: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
f12cdf8954
avformat/omadec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7c684827d9
avformat/oggdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
3bb61f55b7
avformat/nutdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
06f31d01e6
avformat/nsvdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
2135167c30
avformat/mxfdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
9821217a4f
avformat/mpsubdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
3237d955e8
avformat/mpl2dec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
bcdc1d1060
avformat/mpeg: Simplify cleanup after reading vobsub header fails
...
by setting the FF_FMT_INIT_CLEANUP flag. Furthermore, also remove
an unnecessary check for NULL before avformat_close_input().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
c6e9672b50
avformat/mov: Simplify cleanup after read_header failure
...
By default, a demuxer's read_close function is not called automatically
if an error happens when reading the header; instead it is up to the
demuxer to clean up after itself in this case. The mov demuxer did this
by calling its read_close function when it encountered some errors when
reading the header.
This commit changes this by setting the FF_FMT_INIT_CLEANUP flag so that
mov_read_close() is automatically called when an error happens when
reading the header.
(Btw: mov_read_close() is not idempotent: Calling it twice is
dangerouos, because MOVContext.frag_index.item will be av_freep'ed,
yet MOVContext.frag_index.nb_items won't be reset. So the calls to
mov_read_close() have to be removed before the switch to freeing
generically.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
cc768bf7e4
avformat/mlvdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
da45c89fe1
avformat/microdvddec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
d18eee412a
avformat/mccdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
d32a403102
avformat/matroskadec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7d0e70d372
avformat/lrcdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
37a0fa55df
avformat/libopenmpt: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
87319ed26f
avformat/libgme: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
0d00167b7e
avformat/jvdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7556490b09
avformat/jacosubdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
7a1037b6bd
avformat/icodec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
0a7e911108
avformat/hls: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
Andreas Rheinhardt
c3ba8f0d7e
avformat/dashdec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago