summaryrefslogtreecommitdiff
path: root/libavformat/adxdec.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/utils: Move ff_get_extradata to demux_utils.cAndreas Rheinhardt2022-05-101-0/+1
| | | | | | | | It is only used by demuxers (although it is hypothetically possible that some day e.g. a protocol might need it, but that is unlikely given that they don't deal with AVCodecParameters). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* adxdec: convert to new channel layout APIVittorio Giovara2022-03-151-9/+12
| | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/adxdec: demux multiple blocks at oncePaul B Mahol2020-10-031-9/+17
| | | | Improves decoding speed by 24x
* avformat: Remove unnecessary av_packet_unref()Andreas Rheinhardt2020-02-101-2/+0
| | | | | | | | | Since bae8844e the packet will always be unreferenced when a demuxer returns an error, so that a lot of calls to av_packet_unref() in lots of demuxers are now redundant and can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-3/+3
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat: fix overflows during bit rate calculationAndreas Cadhalpun2016-12-141-1/+1
| | | | | | | | The bit_rate field has type int64_t since commit 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* adxdec: validate sample_rateAndreas Cadhalpun2016-11-071-0/+5
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/adxdec: set bit_rate, fixes duration calculationPaul B Mahol2016-05-151-0/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-141-1/+1
| | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-15/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | lavf/adxdec: Add Autodetection.Carl Eugen Hoyos2016-02-011-0/+14
| |
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-271-2/+2
|\ \ | |/ | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-2/+2
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * avformat/adxdec: set avctx->channels in adx_read_headerAndreas Cadhalpun2015-03-051-0/+6
| | | | | | | | | | | | | | | | | | It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/adxdec: check avctx->channels for invalid valuesAndreas Cadhalpun2015-02-261-0/+5
| | | | | | | | | | | | | | This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/adxdec: set avctx->channels in adx_read_headerAndreas Cadhalpun2015-02-261-0/+6
| | | | | | | | | | | | | | It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6'Michael Niedermayer2014-07-091-7/+5
|\ \ | |/ | | | | | | | | | | * commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6': adxdec: get rid of an avpriv function Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * adxdec: get rid of an avpriv functionAnton Khirnov2014-07-091-7/+5
| | | | | | | | | | The only thing the demuxer needs is the sample rate to set the timebase, which can be simply read with AV_RB32.
* | avformat/adxdec: use ff_get_extradata()Michael Niedermayer2013-12-251-6/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-2/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Reinstate proper FFmpeg license for all files.Thilo Borgmann2013-08-301-4/+4
|/
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
|
* lavf: rename AVInputFormat.value to raw_codec_id.Anton Khirnov2012-01-311-2/+2
| | | | It's only used by raw demuxers for storing the codec id.
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-271-1/+1
|
* adx: add AVFMT_GENERIC_INDEX to demuxer flags.Justin Ruggles2012-01-031-0/+1
| | | | fixes seeking
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+2
| | | | It's supposed to be called only from (de)muxers.
* adx: rename ff_adx_decode_header() to avpriv_adx_decode_header()Justin Ruggles2011-11-261-2/+3
| | | | | It is used by the ADX decoder, and therefore needs to be exported in order to work with shared libs.
* avformat: add CRI ADX format demuxerJustin Ruggles2011-11-261-0/+110