aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/brstm.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move FF_FMT_INIT_CLEANUP to demux.hAndreas Rheinhardt2024-03-261-2/+2
| | | | | | | | | and rename it to FF_INFMT_INIT_CLEANUP. This flag is demuxer-only, so this is the more appropriate place for it. This does not preclude adding internal flags common to both demuxer and muxer in the future. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avformat: Add FFInputFormat, hide internals of AVInputFormatAndreas Rheinhardt2024-03-071-8/+8
| | | | | | | | | | | | | | | | | | | | | This commit does for AVInputFormat what commit 59c9dc82f450638a3068deeb1db5c56f6d155752 did for AVOutputFormat: It adds a new type FFInputFormat, moves all the internals of AVInputFormat to it and adds a now reduced AVInputFormat as first member. This does not affect/improve extensibility of both public or private fields for demuxers (it is still a mess due to lavd). This is possible since 50f34172e0cca2cabc5836308ec66dbf93f5f2a3 (which removed the last usage of an internal field of AVInputFormat in fftools). (Hint: tools/probetest.c accesses the internals of FFInputFormat as well, but given that it is a testing tool this is not considered a problem.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/demux: Add new demux.h headerAndreas Rheinhardt2022-05-101-0/+1
| | | | | | And move those stuff already in demuxer-only files to it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* brstm: convert to new channel layout APIAnton Khirnov2022-03-151-21/+22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/brstm: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-071-29/+15
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: make ff_update_cur_dts() sharedJames Almer2021-06-091-1/+1
| | | | | | libavdevice needs it. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-2/+2
| | | | | | | 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/brstm: remove custom allocation of table to hold coeffsPaul B Mahol2020-09-121-10/+1
|
* avformat/brstm: fix decoding brstm with custom coeff offsetsPaul B Mahol2020-09-121-1/+30
|
* avformat/brstm: clip timestamp when seeking into acceptable rangePaul B Mahol2020-09-101-0/+4
|
* avformat: Remove unnecessary av_packet_unref()Andreas Rheinhardt2020-02-101-2/+1
| | | | | | | | | 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-2/+2
| | | | | | | | | | 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-2/+2
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-291-1/+1
|
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-30/+30
| | | | | | | | | | | | | | | | * 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>
* avformat/brstm: lower magic number, fixes decoding of some filesPaul B Mahol2016-04-031-1/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* brstm: fix missing closing braceAndreas Cadhalpun2016-01-041-0/+1
| | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* brstm: also allocate b->table in read_packetAndreas Cadhalpun2016-01-041-0/+4
| | | | | | | | This fixes NULL pointer dereferencing if the codec is forced to adpcm_thp even though a different one was detected. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* brstm: make sure an ADPC chunk was read for adpcm_thpAndreas Cadhalpun2016-01-041-0/+5
| | | | | | | This fixes NULL pointer dereferencing. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* brstm: reject negative sample rateAndreas Cadhalpun2015-11-101-1/+1
| | | | | | | A negative sample rate causes assertion failures in av_rescale_rnd. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-1/+1
|
* avformat/brstm: fix overflowPaul B Mahol2015-09-231-0/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/brstm: Remove unused variableMichael Niedermayer2015-07-121-2/+2
| | | | | | Fixes "libavformat/brstm.c:128:35: warning: variable info_size set but not used" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/brstm: if the file lies about the last block's size, correct itRodger Combs2015-06-271-0/+9
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/brstm: expose the loop point when presentRodger Combs2015-06-251-2/+13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* brstm: fix use of uninitialized variablesJames Almer2015-06-241-1/+1
| | | | | | Fixes valgrind complaining about "Conditional jump or move depends on uninitialised value(s)" Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/brstm: support little-endian s16 PCMPaul B Mahol2015-06-211-1/+3
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavf/brstm: handle a BFSTM endianness oddityRodger Combs2015-06-211-1/+11
|
* lavf/brstm: add support for seekingRodger Combs2015-06-211-0/+23
|
* lavf/brstm: cleanup; fix short-block demuxingRodger Combs2015-06-211-34/+43
|
* lavf/brstm: move bfstm var to a localRodger Combs2015-06-211-14/+9
|
* lavf/brstm: allow larger block sizesRodger Combs2015-06-201-1/+1
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/brstm: support little-endian files (BCSTM; 3DS)Rodger Combs2015-06-201-38/+62
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/brstm: add support for BFSTM filesRodger Combs2015-06-171-20/+109
| | | | | Previous version reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* replace calls to url_feof() with avio_feof()James Almer2014-08-081-2/+2
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* fix various typosLou Logan2014-06-031-1/+1
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc & lavf: replace deprecated av_log* functionsPaul B Mahol2013-03-151-4/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* brstm: ask for samples for version != 1.0Michael Niedermayer2012-12-161-0/+4
| | | | | | This also avoids 2 unused variable warnings. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* brstm: add missing new line to request for sample messagesPaul B Mahol2012-12-161-2/+2
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* brstm: fix number of samples for the last blockJames Almer2012-12-161-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* brstm: do not return partial packetsPaul B Mahol2012-12-071-5/+4
| | | | | | Such packets are useless. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* BRSTM demuxerPaul B Mahol2012-11-291-0/+294
Signed-off-by: Paul B Mahol <onemda@gmail.com>