aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
AgeCommit message (Collapse)Author
2019-09-02avformat/avidec: add support for recognizing HEVC fourcc when demuxingMarton Balint
Some security cams generate this, as well as some versions of VirtualDub and VLC so support for _reading_ such files is justified. Fixes ticket #7110. See also this discussion: https://patchwork.ffmpeg.org/patch/8744/ Signed-off-by: Marton Balint <cus@passwd.hu> (cherry picked from commit 2e31774b409d77f046f166fb3ff630a9ef91def7)
2019-05-10lavf/avidec: Do not test for bitrate <= INT_MAX.Carl Eugen Hoyos
AVCodecContext->bit_rate is int64_t since 7404f3bd Unbreaks non-interleaved detection of v210 4k avi files, broken since 0eec40b7. Reported-by: Xavier Càmara, Centre de Conservació i Restauració, Filmoteca de Catalunya
2019-03-21lavf: Constify the probe function argument.Carl Eugen Hoyos
Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
2019-03-20lavf: Constify AVInputFormat pointer.Carl Eugen Hoyos
2018-08-21avformat/avidec: fix demuxing of all keyframes of sample 200707170736151.aviPaul B Mahol
2018-03-10avformat/avidec: Fix integer overflow in cum_len checkMichael Niedermayer
Fixes: signed integer overflow: 3775922176 * 4278190080 cannot be represented in type 'long' Fixes: Chromium bug 791237 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-26avcodec/exif: remove GetByteContext usage from avpriv_exif_decode_ifd()James Almer
This prevents potential ABI issues with GetByteContext. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-01Use the new AVIOContext destructor.Anton Khirnov
(cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-11avformat/avidec: Move packet skip after prefix and related checksMichael Niedermayer
This fixes loosing packets Fixes: big.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-31avformat/avidec: Limit formats in gab2 to srt and ass/ssaMichael Niedermayer
This prevents part of one exploit leading to an information leak Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-31avformat/avidec: Fix txts fmts parsingMichael Niedermayer
Fixes: subtitle.avi from vlc/ticket/1162 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-29lavf: use av_fourcc2str() where appropriateClément Bœsch
2017-03-29lavf: fix usages of av_get_codec_tag_string()Clément Bœsch
2017-03-24Merge commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521'Clément Bœsch
* commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521': Remove some pointless TRACE level debug code Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23Merge commit 'bad4aad4037f59ba0ad656164be9ab8f7a0fa2d4'Clément Bœsch
* commit 'bad4aad4037f59ba0ad656164be9ab8f7a0fa2d4': avidec: Do not special case palette on big-endian This commit is a noop, see 64cafe340bd5ddfe704efa95cd9f21471ca12a12 Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
2017-01-03avformat/avidec: clean-up identifier namesTobias Rapp
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-23avformat/avidec: skip odml master index chunks in avi_syncTobias Rapp
Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-30avidec: fix leaking extradataAndreas Cadhalpun
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-27Remove some pointless TRACE level debug codeDiego Biurrun
This also kills some warnings with certain compiler options.
2016-10-18lavf/avidec: Be more verbose when ignoring very large tag size.Carl Eugen Hoyos
2016-10-18lavf/avidec: Do not fail for very large idx1 tags.Carl Eugen Hoyos
Fixes demuxing the sample file from github pull request 197, the size of its idx1 tag is 6171936 bytes, followed by a JUNK tag of 9505704 bytes.
2016-10-02avidec: Do not special case palette on big-endianVittorio Giovara
This simplifies the code a bit, does not change output data in any way.
2016-10-02avidec: Set palette alpha as fully opaqueVittorio Giovara
Palette format is always in RGBA.
2016-09-30lavf: fix usage of AVIOContext.seekableAnton Khirnov
It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
2016-09-28avformat/avidec: Check nb_streams in read_gab2_sub()Michael Niedermayer
Fixes null pointer dereference Fixes: 1/null_point.avi Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28avformat/avidec: Remove ancient assertMichael Niedermayer
This assert can with crafted files fail, a warning is already printed for this case. Fixes assertion failure Fixes:1/assert.avi Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-25avformat/avidec: remove warning about deprecated declarationsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-25avformat/avidec: Fix memleak with dv in aviMichael Niedermayer
Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-02avformat/avidec: Fix infinite loop in avi_read_nikon()Michael Niedermayer
Fixes: 360/test.poc Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-21Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
2016-05-18avformat/avidec: Detect index with too short entriesMichael Niedermayer
Fixes Ticket5498 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-04-14avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol
Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-10Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis
* 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-03-18lavf/avidec: Add blurb regarding the skipping of xxpc entries in the indexMats Peterson
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-10lavf/avidec: Skip xxpc entries in index; fixes trac #5311Mats Peterson
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04avformat: Add a protocol blacklisting APIDerek Buitenhuis
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-23lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov
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.
2015-12-08Merge commit '5f3a081b42b84404a40a52c80ef7a354cf048c56'Hendrik Leppkes
* commit '5f3a081b42b84404a40a52c80ef7a354cf048c56': avi: Spin out the logic to position to the next non-interleaved stream Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-07Merge commit 'd017ed878a45171f2f6c69fb9d76401c3c494110'Hendrik Leppkes
* commit 'd017ed878a45171f2f6c69fb9d76401c3c494110': avi: Use the correct data type Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-04avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch
2015-12-02avi: Spin out the logic to position to the next non-interleaved streamLuca Barbato
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02avi: Use the correct data typeLuca Barbato
avio_tell returns an int64_t.
2015-12-02avi: Validate the stream-id for DV as wellMichael Niedermayer
Avoid false positives while syncing. Bug-Id: ffmpeg/4086 Bug-Id: 879 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-27Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes
2015-10-27Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-26avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato
`av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
2015-09-17avformat/avidec: disable parsing for RV40Michael Niedermayer
Fixes: broken_rv40.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-15avformat/avidec: Change (last)pos to 64bitMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>