summaryrefslogtreecommitdiff
path: root/libavformat/rsd.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>
* avformat: Remove unnecessary inclusions from libavcodecAndreas Rheinhardt2022-03-231-1/+0
| | | | | | Also improve the other headers a bit while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* rsd: convert to new channel layout APIAnton Khirnov2022-03-151-13/+13
| | | | 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>
* uavformat/rsd: check for EOF in extradataMichael Niedermayer2021-01-111-0/+2
| | | | | | | | Fixes: OOM Fixes: 26503/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6530816735444992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rsd: Check size and start before computing durationMichael Niedermayer2020-10-301-12/+22
| | | | | | | | Fixes: signed integer overflow: 100794754 * 28 cannot be represented in type 'int' Fixes: 26474/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-5181797606096896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-3/+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-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* lavf: fix usages of av_get_codec_tag_string()Clément Bœsch2017-03-291-3/+1
|
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-6/+6
| | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
* rsd: limit number of channelsAndreas Cadhalpun2016-10-201-1/+3
| | | | | | | | | Negative values don't make sense and too large values can cause overflows. For AV_CODEC_ID_ADPCM_THP this leads to a too small extradata buffer being allocated, causing out-of-bounds writes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.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-45/+45
| | | | | | | | | | | | | | | | * 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/rsd: implement seekingPaul B Mahol2015-11-201-0/+7
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: reindent after the last commitJames Almer2015-11-191-13/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rsd: GADP files are adpcm_thp_leJames Almer2015-11-191-9/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rsd: XMA2 is actually stored, not XMA1Paul B Mahol2015-11-111-6/+6
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: add XMA supportPaul B Mahol2015-11-091-2/+14
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: add VAG supportPaul B Mahol2015-10-181-1/+7
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: Check av_new_packet() return valueMichael Niedermayer2015-10-171-1/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rsd: propagate return values of extradata helper functionsJames Almer2015-10-161-5/+5
| | | | | | They can return errors other than ENOMEM Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rsd: add WADP supportPaul B Mahol2015-10-161-18/+37
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: support XADP tagPaul B Mahol2015-10-111-2/+12
| | | | | | It appears that Xbox ADPCM is same as WAV adpcm. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: make tag_buf string largerClément Bœsch2014-12-201-1/+1
| | | | av_get_codec_tag_string() uses more that 1 char for unprintable characters.
* replace calls to url_feof() with avio_feof()James Almer2014-08-081-1/+1
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/rsd: use ff_get_extradata()Michael Niedermayer2013-12-251-5/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/rsd: increase the score for odd samplerate/channels to max/8Michael Niedermayer2013-11-101-2/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/rsd: increase probe score, as misdetections are fixedMichael Niedermayer2013-11-061-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/rsd: Check channels and sample_rate fieldsMichael Niedermayer2013-11-061-4/+7
| | | | | | Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* ADPCM IMA Radical decoderJames Almer2013-05-101-2/+11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* RSD demuxerJames Almer2013-05-101-0/+161
Signed-off-by: James Almer <jamrial@gmail.com>