Michael Niedermayer
7186ec88b9
uavformat/rsd: check for EOF in extradata
...
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>
4 years ago
Michael Niedermayer
c79d8a6851
avformat/rsd: Check size and start before computing duration
...
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>
4 years ago
Andreas Rheinhardt
c1e439d7e9
avformat: Forward errors where possible
...
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>
5 years ago
Carl Eugen Hoyos
4d8875ec23
lavf: Constify the probe function argument.
...
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
6 years ago
Clément Bœsch
cd4d6cba12
lavf: fix usages of av_get_codec_tag_string()
8 years ago
Andreas Cadhalpun
ee5f0f1d35
rsd: limit number of channels
...
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>
8 years ago
Paul B Mahol
323b8c95e4
avformat: add AVFormatContext to ff_get_extradata()
...
Needed for av_log() inside that function.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
b885d9ced5
avformat/rsd: implement seeking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
James Almer
183827e689
avformat/rsd: reindent after the last commit
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
James Almer
01c63e69f1
avformat/rsd: GADP files are adpcm_thp_le
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Paul B Mahol
2905c51204
avformat/rsd: XMA2 is actually stored, not XMA1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
0cfd4a993f
avformat/rsd: add XMA support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
bb1d3f1078
avformat/rsd: add VAG support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Michael Niedermayer
92a26261d1
avformat/rsd: Check av_new_packet() return value
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
James Almer
8297f560cc
avformat/rsd: propagate return values of extradata helper functions
...
They can return errors other than ENOMEM
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Paul B Mahol
3a63890154
avformat/rsd: add WADP support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
a99226133e
avformat/rsd: support XADP tag
...
It appears that Xbox ADPCM is same as WAV adpcm.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Clément Bœsch
edbbb11488
avformat/rsd: make tag_buf string larger
...
av_get_codec_tag_string() uses more that 1 char for unprintable characters.
10 years ago
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2e2cab6e4f
avformat/rsd: use ff_get_extradata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
eb96802355
avformat/rsd: increase the score for odd samplerate/channels to max/8
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7b7697646b
avformat/rsd: increase probe score, as misdetections are fixed
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
50a3c4c5d2
avformat/rsd: Check channels and sample_rate fields
...
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
a807c68253
avformat: use ff_alloc_extradata()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
James Almer
67fad0d221
ADPCM IMA Radical decoder
...
Signed-off-by: James Almer <jamrial@gmail.com>
12 years ago
James Almer
d3710c51d9
RSD demuxer
...
Signed-off-by: James Almer <jamrial@gmail.com>
12 years ago