c4de49edc4
avformat/electronicarts: If no packet has been read at the end do not treat it as if theres a packet
...
Fixes: Assertion failure
Fixes: 17770/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5700606668308480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-10-01 22:16:20 +02:00
4d8875ec23
lavf: Constify the probe function argument.
...
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
2019-03-21 11:42:17 +01:00
8812d047bc
electronicarts: prevent overflow during block alignment calculation
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2017-01-29 01:20:52 +01:00
ad5807f8aa
avformat: fix overflows during bit rate calculation
...
The bit_rate field has type int64_t since commit
7404f3bdb9
.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-12-14 01:06:55 +01:00
8ef57a0d61
Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
...
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <u@pkh.me >
2016-06-21 21:55:34 +02:00
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2016-05-04 18:16:21 +02:00
6f69f7a8bf
Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
...
* 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 >
2016-04-10 20:59:55 +01:00
9200514ad8
lavf: replace AVStream.codec with AVStream.codecpar
...
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.
2016-02-23 17:01:58 +01:00
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
2015-10-27 14:35:30 +01:00
7f5af80ba4
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
...
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
avpacket: Replace av_free_packet with av_packet_unref
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com >
2015-10-27 14:28:56 +01:00
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
cdfc61de4e
libavformat/electronicarts: also demux mpeg audio layer 2
...
Signed-off-by: Peter Ross <pross@xvid.org >
http://wiki.multimedia.cx/index.php?title=Electronic_Arts_SCxl
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-10-22 12:08:05 +02:00
6debfce6a3
avformat/electronicarts: fix demuxing of certain eam files
...
Such files have gaps between header chunks.
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2015-10-22 11:01:00 +02:00
0d7c027483
avformat/electronicarts: support ADPCM PSX
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2015-10-22 11:01:00 +02:00
803bdc5469
electronicarts: demux alpha stream
...
Electronic Arts VP6 files may contain two video streams: one for the
primary video stream and another for the alpha mask. The file format
uses identical data structures for both streams.
Signed-off-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-25 12:45:09 +02:00
a2517fca1e
electronicarts: move video stream properties into dedicated structure
...
This is required for the alpha stream demux patch.
Signed-off-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-25 12:45:00 +02:00
b368428fc0
avformat/electronicarts: Fixed ea_probe function to accept vp6a videos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-23 03:34:33 +02:00
6dfa70f272
Correct few "ffmpeg" typos
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2014-08-24 11:05:42 +00:00
3e07a056a8
Merge commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421'
...
* commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421':
electronicarts: set the framerate for TGQ/TQI
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-22 21:00:06 +02:00
ce1059d5c9
Merge commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136'
...
* commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136':
electronicarts: read the framerate for MAD
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-22 20:50:16 +02:00
350dd85345
Merge commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b'
...
* commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b':
electronicarts: do not fail on zero-sized chunks
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-22 19:01:26 +02:00
cb7b1a2dfb
electronicarts: set the framerate for TGQ/TQI
...
It is hardcoded to 15fps.
2014-08-22 11:15:20 +00:00
7b6aae23e1
electronicarts: read the framerate for MAD
2014-08-22 11:15:20 +00:00
4d6c515284
electronicarts: do not fail on zero-sized chunks
...
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).
CC: libav-stable@libav.org
2014-08-22 11:15:20 +00:00
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 >
2014-08-08 00:48:38 +02:00
28ee7757f5
Merge commit 'd92024f18fa3d69937cb2575f3a8bf973df02430'
...
* commit 'd92024f18fa3d69937cb2575f3a8bf973df02430':
lavf: more correct printf format specifiers
Conflicts:
libavformat/asfdec.c
libavformat/cafdec.c
libavformat/dxa.c
libavformat/framecrcenc.c
libavformat/hnm.c
libavformat/iff.c
libavformat/mov.c
libavformat/mxfdec.c
libavformat/rmdec.c
libavformat/rpl.c
libavformat/smacker.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-03-11 21:05:34 +01:00
d92024f18f
lavf: more correct printf format specifiers
2014-03-11 13:13:41 +01:00
55328d5f72
avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-21 14:09:45 +01:00
587e3c3426
avformat/electronicarts: use 64bit variable for avio_tell() result
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-21 13:48:15 +01:00
f9b89b61f8
avformat/electronicarts: check chunksize more completely in probe()
...
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-11-11 21:31:56 +01:00
20769d9349
avformat/electronicarts: check chunk size.
...
Fix infinite loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-11-11 19:51:12 +01:00
7057cc861d
Merge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'
...
* commit 'a9221e39600a31ee13e736e9e47743cde23f0280':
electronicarts: Add more sanity checking for the number of channels
Note: This check is probably unnecessary
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-09-29 23:52:07 +02:00
a9221e3960
electronicarts: Add more sanity checking for the number of channels
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st >
2013-09-29 19:58:41 +03:00
eeeb3c8fa3
Merge commit 'f7e616959aff8706edccdae763c24c897c449f6f'
...
* commit 'f7e616959aff8706edccdae763c24c897c449f6f':
electronicarts: Check packet sizes before reading
Conflicts:
libavformat/electronicarts.c
See: fb1ea777b3
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-09-23 14:27:09 +02:00
f7e616959a
electronicarts: Check packet sizes before reading
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st >
2013-09-22 21:02:52 +03:00
165e42b542
Merge commit '163a729725c6eb0081b0af41a7279f7d19aee86e'
...
* commit '163a729725c6eb0081b0af41a7279f7d19aee86e':
electronicarts: Let functions always returning the same value return void
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-16 12:25:07 +02:00
4195321a82
Merge commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529'
...
* commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529':
electronicarts: Improve some function/variable names
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-16 12:14:32 +02:00
6bba695785
Merge commit 'a90cff137b2aca89380b0acad41cd7bb05619ece'
...
* commit 'a90cff137b2aca89380b0acad41cd7bb05619ece':
electronicarts: comment wording fixes
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-16 12:08:47 +02:00
6a4e55a246
Merge commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c'
...
* commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c':
electronicarts: Remove bogus function documentation
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-16 12:07:49 +02:00
a87cf3689e
Merge commit '8747fce91fca6bb8e9936497f2de05c905cf43b5'
...
* commit '8747fce91fca6bb8e9936497f2de05c905cf43b5':
electronicarts: K&R formatting cosmetics
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-16 12:01:22 +02:00
163a729725
electronicarts: Let functions always returning the same value return void
2013-08-15 12:24:43 +02:00
4908c8ef27
electronicarts: Improve some function/variable names
2013-08-15 12:24:42 +02:00
a90cff137b
electronicarts: comment wording fixes
2013-08-15 12:24:42 +02:00
288f2ffb57
electronicarts: Remove bogus function documentation
2013-08-15 12:24:42 +02:00
8747fce91f
electronicarts: K&R formatting cosmetics
2013-08-15 12:24:42 +02:00
1831274ff1
electronicarts: check timebase, fix assertion failure
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-03-28 01:08:46 +01:00
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-03-15 18:10:28 +00:00
85a5bc054c
lavf: remove disabled FF_API_R_FRAME_RATE cruft
2013-03-11 18:23:50 +01:00
fb1ea777b3
electronicarts: check size before reading duration out of a chunk.
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2012-11-17 20:43:56 +01:00
6f78ba8b0b
electronic arts: support rare samples containing adpcm_ea_r1 audio
...
Fixes ticket #1549 .
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2012-11-11 12:52:02 +01:00