summaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/avidec: Remove superfluous headerAndreas Rheinhardt2019-10-251-1/+0
| | | | | | | | | | | bswap.h was included since 7b114c09, yet since 3788a3c0 no explicit use of anything from bswap.h has been made, so remove this header. (Only AV_RL32 is used and while this might imply swapping on big-endian systems, it is contained in libavutil/intreadwrite.h.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avidec: add logging context to logSteven Liu2019-10-081-7/+7
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/avidec: fix memory leak in error handling pathJun Zhao2019-09-101-1/+3
| | | | | | | free the value in error handling path to avoid the memory leak. Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avidec: add support for recognizing HEVC fourcc when demuxingMarton Balint2019-08-311-0/+3
| | | | | | | | | | | 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>
* lavf/avidec: Do not test for bitrate <= INT_MAX.Carl Eugen Hoyos2019-05-101-1/+1
| | | | | | | 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
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* lavf: Constify AVInputFormat pointer.Carl Eugen Hoyos2019-03-201-1/+1
|
* avformat/avidec: fix demuxing of all keyframes of sample 200707170736151.aviPaul B Mahol2018-08-211-0/+5
|
* avformat/avidec: Fix integer overflow in cum_len checkMichael Niedermayer2018-03-101-1/+1
| | | | | | | | | 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>
* avcodec/exif: remove GetByteContext usage from avpriv_exif_decode_ifd()James Almer2017-10-261-2/+2
| | | | | | | This prevents potential ABI issues with GetByteContext. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Use the new AVIOContext destructor.Anton Khirnov2017-09-011-1/+1
| | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avidec: Move packet skip after prefix and related checksMichael Niedermayer2017-08-111-13/+12
| | | | | | | This fixes loosing packets Fixes: big.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avidec: Limit formats in gab2 to srt and ass/ssaMichael Niedermayer2017-05-311-0/+3
| | | | | | | | | 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>
* avformat/avidec: Fix txts fmts parsingMichael Niedermayer2017-05-311-1/+2
| | | | | | Fixes: subtitle.avi from vlc/ticket/1162 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: use av_fourcc2str() where appropriateClément Bœsch2017-03-291-7/+3
|
* lavf: fix usages of av_get_codec_tag_string()Clément Bœsch2017-03-291-6/+2
|
* Merge commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521'Clément Bœsch2017-03-241-18/+0
|\ | | | | | | | | | | | | * commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521': Remove some pointless TRACE level debug code Merged-by: Clément Bœsch <u@pkh.me>
| * Remove some pointless TRACE level debug codeDiego Biurrun2016-10-271-17/+0
| | | | | | | | This also kills some warnings with certain compiler options.
| * avidec: Set palette alpha as fully opaqueVittorio Giovara2016-10-021-1/+1
| | | | | | | | Palette format is always in RGBA.
* | Merge commit 'bad4aad4037f59ba0ad656164be9ab8f7a0fa2d4'Clément Bœsch2017-03-231-1/+1
|\ \ | |/ | | | | | | | | | | | | | | * 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>
| * avidec: Do not special case palette on big-endianVittorio Giovara2016-10-021-5/+1
| | | | | | | | This simplifies the code a bit, does not change output data in any way.
* | Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-2/+2
|\ \ | |/ | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-2/+3
| | | | | | | | | | | | | | | | 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.
* | avformat/avidec: clean-up identifier namesTobias Rapp2017-01-031-7/+7
| | | | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avidec: skip odml master index chunks in avi_syncTobias Rapp2016-12-231-1/+2
| | | | | | | | | | | | | | 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>
* | avidec: fix leaking extradataAndreas Cadhalpun2016-11-301-0/+8
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | lavf/avidec: Be more verbose when ignoring very large tag size.Carl Eugen Hoyos2016-10-181-1/+5
| |
* | lavf/avidec: Do not fail for very large idx1 tags.Carl Eugen Hoyos2016-10-181-0/+2
| | | | | | | | | | | | 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.
* | avformat/avidec: Check nb_streams in read_gab2_sub()Michael Niedermayer2016-09-281-0/+2
| | | | | | | | | | | | | | | | Fixes null pointer dereference Fixes: 1/null_point.avi Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avidec: Remove ancient assertMichael Niedermayer2016-09-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | avformat/avidec: remove warning about deprecated declarationsJames Almer2016-09-251-0/+4
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/avidec: Fix memleak with dv in aviMichael Niedermayer2016-09-251-0/+4
| | | | | | | | | | Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avidec: Fix infinite loop in avi_read_nikon()Michael Niedermayer2016-09-021-2/+2
| | | | | | | | | | | | | | Fixes: 360/test.poc Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/avidec: Detect index with too short entriesMichael Niedermayer2016-05-181-0/+2
| | | | | | | | | | | | Fixes Ticket5498 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-141-2/+2
| | | | | | | | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-90/+89
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-68/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | lavf/avidec: Add blurb regarding the skipping of xxpc entries in the indexMats Peterson2016-03-181-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/avidec: Skip xxpc entries in index; fixes trac #5311Mats Peterson2016-03-101-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-041-1/+1
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '5f3a081b42b84404a40a52c80ef7a354cf048c56'Hendrik Leppkes2015-12-081-62/+72
|\ \ | |/ | | | | | | | | | | * commit '5f3a081b42b84404a40a52c80ef7a354cf048c56': avi: Spin out the logic to position to the next non-interleaved stream Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avi: Spin out the logic to position to the next non-interleaved streamLuca Barbato2015-12-021-62/+72
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * avi: Validate the stream-id for DV as wellMichael Niedermayer2015-12-021-1/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'd017ed878a45171f2f6c69fb9d76401c3c494110'Hendrik Leppkes2015-12-071-2/+3
|\ \ | |/ | | | | | | | | | | * commit 'd017ed878a45171f2f6c69fb9d76401c3c494110': avi: Use the correct data type Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avi: Use the correct data typeLuca Barbato2015-12-021-2/+3
| | | | | | | | avio_tell returns an int64_t.
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-041-1/+1
| |
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-1/+1
| |
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-271-3/+3
|\ \ | |/ | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
OpenPOWER on IntegriCloud