summaryrefslogtreecommitdiff
path: root/libavformat/mlvdec.c
Commit message (Collapse)AuthorAge
* avformat/demux: Add new demux.h headerAndreas Rheinhardt2022-05-10
| | | | | | And move those stuff already in demuxer-only files to it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-17
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mlvdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-07
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavf: move AVStream.*index_entries* to AVStreamInternalAnton Khirnov2020-10-28
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Since there are some (semi-)public fields located after these, even though this section is supposed to be private, keep some dummy padding there until the next major bump to preserve ABI compatibility.
* avformat/mlvdec: Only store dimensions after having validated themAndreas Rheinhardt2020-08-18
| | | | | | | Otherwise it might happen that invalid dimensions are used when reading a video packet; this might lead to undefined overflow. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mlvdec: Don't leak open AVIOContexts on errorAndreas Rheinhardt2020-08-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mlvdec: Check for existence of AVIOContext before using itAndreas Rheinhardt2020-08-18
| | | | | | | | | | | The mlv demuxer supports input split into multiple files; if invalid data is encountered when parsing one of the subsequent files, that file is closed. But at this point some index entries belonging to this file might already have been added. In this case, the read_packet function might try to use the AVIOContext (which is NULL) to read data which will of course crash. This commit fixes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mlvdec: fail reading a packet with 0 streamsMichael Niedermayer2020-06-07
| | | | | | | | Fixes: NULL pointer dereference Fixes: 22604/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5667739074297856.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mlvdec:drop unnecessary check before ff_format_io_closeSteven Liu2019-11-09
| | | | | | Reviewed-by: Linjie Fu <linjie.fu@intel.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/mlvdec: read_string() received unsigned size, make the argument ↵Michael Niedermayer2018-08-17
| | | | | | | | | | | unsigned Fixes: infinite loop Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04 Found-by: Paul Ch <paulcher@icloud.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf: use av_fourcc2str() where appropriateClément Bœsch2017-03-29
|
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-21
| | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
| | | | | | | | | | | | | | | | * 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>
* Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'Derek Buitenhuis2016-02-10
| | | | | | | | | This also deprecates our old duplicated callbacks. * commit '9f61abc8111c7c43f49ca012e957a108b9cc7610': lavf: allow custom IO for all files Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mlvdec: validate bits_per_coded_sampleAndreas Cadhalpun2015-12-22
| | | | | | | | | | | A negative bits_per_coded_sample doesn't make sense. If it is too large, the size calculation for av_get_packet overflows, resulting in allocation of a too small buffer. Also make sure width and height are sane. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mlvdec: check that index_entries existAndreas Cadhalpun2015-12-20
| | | | | | | This fixes NULL pointer dereferencing. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit 'd80811c94e068085aab797f9ba35790529126f85'Michael Niedermayer2015-07-12
| | | | | | | | | | | | | | | | | | | * commit 'd80811c94e068085aab797f9ba35790529126f85': riff: Use the correct logging context Conflicts: libavformat/asfdec_o.c libavformat/avidec.c libavformat/dxa.c libavformat/matroskadec.c libavformat/mov.c libavformat/riff.h libavformat/riffdec.c libavformat/wavdec.c libavformat/wtvdec.c libavformat/xwma.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mlvdec: Use AVFormatContext->open_cb()Michael Niedermayer2015-05-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/mlv: Only add streams that are supposed to contain frames.Carl Eugen Hoyos2015-02-07
| | | | | | Fixes ticket #4296. Reviewed-by: Peter Ross
* avformat/mlvdec: Use avio_closep() to avoid leaving stale pointers in memoryMichael Niedermayer2015-01-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: Simplify code by using avio_closep()Michael Niedermayer2015-01-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavdec: RIFX file format supportThomas Volkert2014-12-18
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: Check the return code from strftime()Michael Niedermayer2014-10-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Use new av_dict_set_int helper function.Reimar Döffinger2014-08-16
| | | | | | | Get rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* replace calls to url_feof() with avio_feof()James Almer2014-08-08
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: close any additional .Mxx filesPeter Ross2014-04-27
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: remove unused MlvContext.bufferPeter Ross2014-04-27
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: print unsigned chunk sizePeter Ross2014-04-27
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mlvdec: process ff_get_wav_header return valuePeter Ross2014-04-27
| | | | | | | Fixes CID1206640. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Magic Lantern Video (MLV) demuxerPeter Ross2014-04-19
Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>