summaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Reviewed-by: Matt Wolenetz <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* 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 <[email protected]> Signed-off-by: James Almer <[email protected]>
* Use the new AVIOContext destructor.Anton Khirnov2017-09-011-1/+1
| | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/avidec: Fix txts fmts parsingMichael Niedermayer2017-05-311-1/+2
| | | | | | Fixes: subtitle.avi from vlc/ticket/1162 Signed-off-by: Michael Niedermayer <[email protected]>
* 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 <[email protected]>
| * 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 <[email protected]>
| * 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 <[email protected]>
| * 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avidec: fix leaking extradataAndreas Cadhalpun2016-11-301-0/+8
| | | | | | | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* | 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: 连一汉 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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: 连一汉 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avidec: remove warning about deprecated declarationsJames Almer2016-09-251-0/+4
| | | | | | | | Signed-off-by: James Almer <[email protected]>
* | avformat/avidec: Fix memleak with dv in aviMichael Niedermayer2016-09-251-0/+4
| | | | | | | | | | Found-by: 连一汉 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avidec: Fix infinite loop in avi_read_nikon()Michael Niedermayer2016-09-021-2/+2
| | | | | | | | | | | | | | Fixes: 360/test.poc Found-by: 连一汉 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <[email protected]>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <[email protected]>
* | avformat/avidec: Detect index with too short entriesMichael Niedermayer2016-05-181-0/+2
| | | | | | | | | | | | Fixes Ticket5498 Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]> - Hendrik Leppkes <[email protected]> - wm4 <[email protected]> - Clément Bœsch <[email protected]> - James Almer <[email protected]> - Michael Niedermayer <[email protected]> - Rostislav Pehlivanov <[email protected]> Merged-by: Derek Buitenhuis <[email protected]>
| * 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 <[email protected]>
* | lavf/avidec: Skip xxpc entries in index; fixes trac #5311Mats Peterson2016-03-101-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-041-1/+1
| | | | | | | | Signed-off-by: Derek Buitenhuis <[email protected]>
* | 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 <[email protected]>
| * avi: Spin out the logic to position to the next non-interleaved streamLuca Barbato2015-12-021-62/+72
| | | | | | | | Signed-off-by: Luca Barbato <[email protected]>
| * 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 <[email protected]> Signed-off-by: Luca Barbato <[email protected]>
* | Merge commit 'd017ed878a45171f2f6c69fb9d76401c3c494110'Hendrik Leppkes2015-12-071-2/+3
|\| | | | | | | | | | | | | * commit 'd017ed878a45171f2f6c69fb9d76401c3c494110': avi: Use the correct data type Merged-by: Hendrik Leppkes <[email protected]>
| * 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 <[email protected]>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-3/+3
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* | avformat/avidec: disable parsing for RV40Michael Niedermayer2015-09-171-0/+2
| | | | | | | | | | | | Fixes: broken_rv40.avi Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avidec: Change (last)pos to 64bitMichael Niedermayer2015-09-151-3/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avidec: Workaround broken initial frameMichael Niedermayer2015-09-151-1/+2
| | | | | | | | | | | | Fixes Ticket4851 Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8'Hendrik Leppkes2015-09-051-13/+0
|\| | | | | | | | | | | | | * commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8': lavc: Drop deprecated destruct_packet related functions Merged-by: Hendrik Leppkes <[email protected]>
| * lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-281-13/+0
| | | | | | | | Deprecated in 10/2012.
* | avformat/avidec: Simplify dshow_block_align based special case detectionMichael Niedermayer2015-08-121-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avidec: Disable AVSTREAM_PARSE_TIMESTAMPS for flacMichael Niedermayer2015-08-121-0/+3
| | | | | | | | | | | | The flac parser does not support it, its also not needed. Signed-off-by: Michael Niedermayer <[email protected]>