summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/matroskadec: Fix memleaks in WebM DASH manifest demuxerAndreas Rheinhardt2020-06-15
| | | | | | | In certain error scenarios, the underlying Matroska demuxer was not properly closed, causing leaks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Use right number of tracksAndreas Rheinhardt2020-06-15
| | | | | | | | | | When demuxing a Matroska/WebM file, streams are added for tracks and for attachments, so that the array containing the former can be NULL even when the corresponding AVFormatContext has streams. So check for there to be tracks in the MatroskaDemuxContext instead of just streams in the AVFormatContext before dereferencing the pointer to the tracks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Fix handling gigantic durationsAndreas Rheinhardt2020-06-15
| | | | | | | | | | matroska_parse_block currently asserts that the duration is not equal to AV_NOPTS_VALUE, but there is nothing that actually guarantees this. It is easy to create (spec-compliant) files which run into this assert; so replace it and instead cap the duration to INT64_MAX, as the duration field of an AVPacket is an int64_t. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Move AVBufferRef instead of copying, fix memleakAndreas Rheinhardt2020-06-15
| | | | | | | | | | | | | EBML binary elements are already made reference-counted when read; so when populating the AVStream.attached_pic, one does not need to allocate a new buffer for the data; instead the current code just creates a new reference to the underlying AVBuffer. But this can be improved even further: Just move the already existing reference. This also fixes a memleak that happens upon error because matroska_read_close has not been called in this scenario. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dashenc: Add hls_master_name optionPrzemysław Sobala2020-06-15
|
* avformat/hlsenc: Always treat numbers as decimalAndreas Rheinhardt2020-06-15
| | | | | | | | | | | c801ab43c36e8c4f88121aa09af26c77bcbd671b caused a regression: The stream number is now parsed with strtoll without a fixed basis; as a consequence, the "010" in a variant stream mapping like "a:010" is now treated as an octal number (i.e. as eight, not ten). This was not intended and may break some scripts, so this commit restores the old behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: free duplicated utf16 stringsMichael Niedermayer2020-06-14
| | | | | | | | | Fixes: memleak Fixes: 23415/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5124814510751744 Suggested-by: Marton Balint <cus@passwd.hu> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/4xm: Check that a video stream was created before returning packets ↵Michael Niedermayer2020-06-14
| | | | | | | | | | for it Fixes: assertion failure Fixes: 23434/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5227750851084288.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/utils: Print analyze duration and probesize when printing a ↵Michael Niedermayer2020-06-14
| | | | | | suggestion to increase them Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Disable mid stream codec changesMichael Niedermayer2020-06-14
| | | | | | | | | Fixes: 22082/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5688619118624768 Fixes: crash from V-codecs/Theora/theora_testsuite_broken/multi2.ogg Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: Lynne on IRC Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ape: Cleanup after ape_read_header() failureMichael Niedermayer2020-06-14
| | | | | | | | Fixes: memleaks Fixes: 23306/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5635436931448832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/prompeg: prompeg_write() must report data all was writtenDavid Holroyd2020-06-14
| | | | | | | | | | | | | | | | Previously, prompeg_write() would only report to caller that bytes we written when a FEC packet was actually created. Not all RTP packets are expected to generate a FEC packet however, so this behavior was causing avio to retry writing the RTP packet, eventually forcing the FEC state machine to send a FEC packet erroneously (and so breaking out of the retry loop). This was resulting in incorrect FEC data being generated, and far too many FEC packets to be sent (~100% FEC overhead). fix #7863 Signed-off-by: David Holroyd <david.holroyd@m2amedia.tv>
* avformat/sccdec: move pos variables outside of loopPaul B Mahol2020-06-13
| | | | Ensures that sub->pos is always correct.
* avformat/thp: Check fpsMichael Niedermayer2020-06-13
| | | | | | | | Fixes: division by zero Fixes: 23162/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4856420817436672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpl2dec: Fix integer overflow with durationMichael Niedermayer2020-06-13
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long' Fixes: 23167/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6425051741290496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check if DTS is AV_NOPTS_VALUE in mov_find_next_sample().Dale Curtis2020-06-13
| | | | | Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/sccdec: split line with multiple subsPaul B Mahol2020-06-13
|
* avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf()Andreas Rheinhardt2020-06-11
| | | | | | | | | | | | | | | | | Two kinds of errors can happen when working with dynamic buffers: (Re)allocation errors or truncation errors (one has to truncate the buffer to a size of INT_MAX because avio_close_dyn_buf() and avio_get_dyn_buf() both return an int). Right now, avio_get_dyn_buf() returns an empty buffer in either case. But given that avio_get_dyn_buf() does not destroy the dynamic buffer, one can return the buffer in case of truncation and let the user check the error flags and decide for himself instead of hardcoding a single way to proceed in case of truncation. (This actually restores the behaviour from before commit 163bb9ac0af495a5cb95441bdb5c02170440d28c.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Return better error codesAndreas Rheinhardt2020-06-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Stop restricting dynamic buffer sizes to INT_MAX/2Andreas Rheinhardt2020-06-11
| | | | | | | | This has originally been done in 568e18b15e2ddf494fd8926707d34ca08c8edce5 as a precaution against integer overflows, but it is actually easy to support the full range of int without overflows. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Simplify dyn_buf_write() a bitAndreas Rheinhardt2020-06-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Don't check for overflow after it happenedAndreas Rheinhardt2020-06-11
| | | | | | | | If adding two ints overflows, it doesn't matter whether the result will be stored in an unsigned or not; and checking afterwards does not make it retroactively defined. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* AVFormatContext: switch to child_class_iterate()Anton Khirnov2020-06-10
|
* AVIOContext: switch to child_class_iterate()Anton Khirnov2020-06-10
|
* URLContext: switch to child_class_iterate()Anton Khirnov2020-06-10
|
* lavf/dump: schedule use of deprecated API for removalAnton Khirnov2020-06-10
|
* avformat/hls: check segment duration value of EXTINFSteven Liu2020-06-10
| | | | | | | fix ticket: 8673 set the default EXTINF duration to 1ms if duration is smaller than 1ms Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hls: check output string is usable of ff_make_absolute_urlSteven Liu2020-06-10
| | | | | | | fix ticket: 8688 should goto failed workflow if cannot get usable string by ff_make_absolute_url Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/url: check return value of strchrSteven Liu2020-06-10
| | | | | | | fix ticket: 8687 workflow should return if there have no value of strchr Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mpegts: add constants for MPEG-TS transport stream identifiersBrad Hards2020-06-09
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/fifo: add timeshift option to delay outputMarton Balint2020-06-09
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Bump minor versions after branching 4.3Michael Niedermayer2020-06-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.3 from masterMichael Niedermayer2020-06-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."Michael Niedermayer2020-06-08
| | | | | | | | | This causes regressions in end to end timestamps with mp3s and ffmpeg. The revert is to avoid this regression in the 4.3 release See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted. This reverts commit 460132c9980f8a1f501a1f69477bca49e1641233.
* avformat/4xm: Cleanup on GET_LIST_HEADER() failureMichael Niedermayer2020-06-08
| | | | | | | | | Fixes: memleak Fixes: 23142/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5932860820422656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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/thp: Check compcountMichael Niedermayer2020-06-07
| | | | | | | | Fixes: out of array access Fixes: 22520/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5100297658826752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Do not hardcode arbitrary and sometimes unavailable sizeMichael Niedermayer2020-06-07
| | | | | | | | | | Fixes: regression since e983197cbc93420b67aa7e811be47d7278c2c8a2 Fixes: out of array read Fixes: 22185/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5662069073641472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Initialize return value from ogg_read_page() and check it ↵Michael Niedermayer2020-06-07
| | | | | | | | | | | | everywhere Fixes regression since 9ad47762c17d2c6d06595aa17b88112baa91b72c Fixes: out of array access Fixes: 22172/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5658535590625280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Fix overflow in compute_pkt_fields().Dale Curtis2020-06-06
| | | | | Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rawdec: fix identifier namesMichael Niedermayer2020-06-06
| | | | | | | | | Fixes: out of array access Fixes: 22686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5121369624018944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Find a fallback probe decoder that will also match a forced ↵Samuel Foss2020-06-04
| | | | | | | | | decoder's codec. Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing. Signed-off-by: Samuel Foss <sfoss@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/tee: pass options to protocol.Nicolas George2020-06-04
| | | | Fix trac ticket #8705.
* avformat/prompeg: av_dict_set() -> av_dict_set_int()Limin Wang2020-06-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpproto: av_dict_set() -> av_dict_set_int()Limin Wang2020-06-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtspdec: av_dict_set() -> av_dict_set_int()Limin Wang2020-06-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: use AVStream timebase when computing missing bitratePrzemysław Sobala2020-06-01
|
* avformat/mpegtsenc: set stream_id correctly based on KLV profile selectedBrad Hards2020-05-31
| | | | | | | Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains the default value. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: add kvag muxerZane van Iperen2020-05-31
| | | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.Dale Curtis2020-05-31
| | | | | Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>