summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* avformat/flvenc: Check pts for mpeg4/h264 (which need the value)Michael Niedermayer2019-11-091-0/+6
| | | | | | Fixes: Ticket8152 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vividas: Fix n_sb_blocks CheckMichael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: signed integer overflow: 1540265776 * 2 cannot be represented in type 'int' Fixes: 18160/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5758808818712576 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-091-2/+1
| | | | | | Reviewed-by: Linjie Fu <linjie.fu@intel.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mxfdec: cleanup on "essence prior to first PartitionPack"Michael Niedermayer2019-11-081-1/+3
| | | | | | | | Fixes: memleak Fixes: 18473/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5738557074833408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/dashdec: drop unnecessary check before ff_format_io_closeJun Zhao2019-11-081-8/+4
| | | | | | | ff_format_io_close will check the AVIOContext pointer pb, so drop the unnecessary check before ff_format_io_close. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/dashenc: enable probesize/max_analyze_duration setting in sub-demuxerJun Zhao2019-11-081-2/+2
| | | | | | | Enable probesize/max_analyze_duration setting when open the sub-demuxer, it's will be used to minimizing the initial delay. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: support probesize/max_analyze_duration when open sub-demuxerJun Zhao2019-11-081-0/+2
| | | | | | | Add probesize/max_analyze_duration support when open the sub-demuxer, it's will be used to minimizing the initial delay. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/flvenc: Cosmetics: fix indentationJun Zhao2019-11-081-4/+4
| | | | | | fix indentation Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/mov: add log context dump in log messageJun Zhao2019-11-081-15/+15
| | | | | | | add log context dump in log message. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: fix the log context setting in log messageJun Zhao2019-11-081-7/+7
| | | | | | Fix the log context setting in log message Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/nutenc: Do not pass NULL to memcmp() in get_needed_flags()Michael Niedermayer2019-11-051-5/+6
| | | | | | | | | | | | | | This compared to the other suggestions is cleaner and easier to understand keeping the condition in the if() simple. This affects alot of fate tests. See: [FFmpeg-devel] [PATCH 05/11] avformat/nutenc: Don't pass NULL to memcmp See: [FFmpeg-devel] [PATCH]lavf/nutenc: Do not call memcmp() with NULL argument Fixes: Ticket 7980 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/Makefile: add missing pcm dependency to sdx demuxerLou Logan2019-11-041-1/+1
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
* avformat/Makefile: add missing pcm dependency to nsp demuxerLou Logan2019-11-041-1/+1
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
* avformat/Makefile: add missing pcm dependency to hcom demuxerLou Logan2019-11-041-1/+1
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
* lavf/asfdec: Simplify the check conditionsJun Zhao2019-11-041-1/+1
| | | | | | Simplify the check conditions Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/mpegtsenc: fix logic check errorJun Zhao2019-11-041-1/+1
| | | | | | | | | fix the logic check error fix #6751 Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/ftp: add AVOptions for authenticationNicolas Frattaroli2019-11-032-6/+17
| | | | | | | | | | | | | | | | | This introduces two new AVOption options for the FTP protocol, one named ftp-user to supply the username to be used for auth, one named ftp-password to supply the password to be used for auth. These are useful for when an API user does not wish to deal with URL manipulation and percent encoding. Setting them while also having credentials in the URL will use the credentials from the URL. The rationale for this is that credentials embedded in the URL are probably more specific to what the user is trying to do than anything set by some API user. Signed-off-by: Nicolas Frattaroli <ffmpeg@fratti.ch> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Add max_probe_packets optionAndriy Gelman2019-11-035-6/+12
| | | | | | | Allows user to set maximum number of buffered packets when probing a codec. It was a hard-coded parameter before this commit. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/flacenc: reject too big picture blocksMattias Wadman2019-11-011-2/+8
| | | | | | | | | | | | | | | | A too big picture will case the muxer to write a truncated block size (uint24) causing the output file to be corrupt. How to reproduce: Write a file with truncated block size: ffmpeg -y -f lavfi -i sine -f lavfi -i color=red:size=2400x2400 -map 0:a:0 -map 1:v:0 -c:v:0 bmp -disposition:1 attached_pic -t 1 test.flac Try to decode: ffmpeg -i test.flac test.wav Signed-off-by: Mattias Wadman <mattias.wadman@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: fix the av_dirname path isn't include separator in the end ↵Limin Wang2019-10-311-6/+10
| | | | | | | of string Reviewed-by: Liu Steven <lq@chinaffmpeg.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/apngenc: Add deinit functionAndreas Rheinhardt2019-10-301-4/+10
| | | | | | | | | | Prevents memleaks when the trailer is never written (e.g. when there was a write error when writing the header). Fixes ticket #8347. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: Set AVFMT_TS_DISCONT flag on HLS input formatPhilip Langdale2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There have been many reports over the years about problems when taking an HLS stream as input to `ffmpeg` where there are timestamp discontinuities present. This is explicitly supported in the HLS spec (EXT-X-DISCONTINUITY) and often used for ad injection. Various fixes and work-arounds have been proposed over the years, but one step that seems obvious, even if it's not a complete fix, is to mark the HLS input format as supporting discontinuities. This will prevent timestamp fixup logic in ffmpeg.c kicking in that ends up mangling the timestamps unnecessarily. I've tested this out with an example provided by Joe Koberg early last year, and it is sufficient to allow `ffmpeg` to download and mux the stream correctly. Joe had briefly suggested that other situations can still be handled incorrectly, but this seems like a strict improvement. Joe's example: https://s3.amazonaws.com/playon-test-videos/discont_test_new/discont_test.m3u8 Reviewed-by: Steven Liu <lq@onvideo.cn> Reviewed-by: Dennis Mungai <dmngaie@gmail.com>
* avformat/dss: Remove superfluous headersAndreas Rheinhardt2019-10-291-2/+0
| | | | | | | | Both attributes.h and bswap.h have been included from the very beginning of this muxer without there being any reason to do so. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wc3movie: fix memleak when read content size not equvipe input sizeSteven Liu2019-10-281-1/+3
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/swfdec: fix memleak when inflateInit failedSteven Liu2019-10-281-0/+2
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/smacker: fix memleak when avformat_new_stream failedSteven Liu2019-10-281-2/+8
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rtmpproto: fix memleak when open rtmp failedSteven Liu2019-10-281-0/+3
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rl2: fix memleak when read end of fileSteven Liu2019-10-281-7/+13
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mpc8: fix memleak when seek table too bigSteven Liu2019-10-281-0/+1
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/libmodplug: fix memleak when load modplug failedSteven Liu2019-10-281-2/+3
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: move freep segment from sls_flags_filename_process after ↵Steven Liu2019-10-281-3/+1
| | | | | | caller failed Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/avienc: Remove superfluous headerAndreas Rheinhardt2019-10-251-1/+0
| | | | | | | | | 04d2540c added intreadwrite.h to avienc.c, although there was (and is) no need to do so. The inclusion seems to be a mistake as this commit added a AV_WL32 to avidec.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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/asfenc: Remove unnecessary headerAndreas Rheinhardt2019-10-251-1/+0
| | | | | | | | | libavutil/parseutils.h has been included in 22bbd6e8 for av_parse_time() and the header has not been removed when said function was replaced by ff_parse_creation_time_metadata() in ea1bf08a. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aiffenc: Add deinit functionAndreas Rheinhardt2019-10-251-4/+9
| | | | | | | Prevents memleaks if the trailer is never written. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/bintext: avoid division by zeroPaul B Mahol2019-10-251-1/+3
| | | | Fixes #8335
* avformat/tee.c: steal bsf option before passing to fifo muxerJun Li2019-10-251-4/+11
| | | | | | | | | Fix #7620 In the case tee muxer with both "bsf" and "use_fifo" parameters will trigger this bug. Tee muxer will first steal parameters (like "f", "select"...) and then "use_fifo" will try reading out remaining options and pass them to fifo as option "format_options". Current code miss the part of stealing "bsf" options.
* avformat/mpeg: Don't free unintialized pointerAndreas Rheinhardt2019-10-241-1/+1
| | | | | | | | | | | | In order to fix a potential memleak upon failure, 0b8956b2 made sure that a buffer given by a pointer was freed upon error. But this pointer was only initialized upon use and in several cases (Clang gives no fewer than 13 -Wsometimes-uninitialized warnings) this meant that an uninitialized pointer was used to free a buffer. So initialize the pointer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/icoenc: Add deinit functionAndreas Rheinhardt2019-10-241-2/+8
| | | | | | | | Prevents memleaks in situations where the trailer isn't written, e.g. because of errors during writing the header. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aiffenc: Use better error codesAndreas Rheinhardt2019-10-241-3/+3
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpeg: Add padding to extradataAndreas Rheinhardt2019-10-241-7/+5
| | | | | | | | | Extradata is supposed to be padded with AV_INPUT_BUFFER_PADDING_SIZE bytes, yet the VobSub demuxer used av_strdup for the allocation of extradata. This has been changed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpeg: move the header_str free into end labelSteven Liu2019-10-221-2/+2
| | | | | | fix CID: 1454875 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/segafilmenc: remove unneeded codeSteven Liu2019-10-221-2/+0
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/matroskaenc: CosmeticsAndreas Rheinhardt2019-10-211-18/+18
| | | | | | | | | | Contains renaming of variables (e.g. mkv_write_cues() contained variables called tracknum that actually contain the index of a track in s->streams and not the track number (which can differ in case an explicit dash track number is set)). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: Use more appropriate function nameAndreas Rheinhardt2019-10-211-10/+8
| | | | | | | | | | | | | | mkv_start_new_cluster() actually didn't start a new cluster, but ended the old one instead and emitted a debug message that it had started a new cluster. This has been changed: The debug message has been moved to the place that really starts a new cluster and the function has been renamed to mkv_end_cluster(). Furthermore, without this debug message the function can be used for flushing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: Remove redundant assertAndreas Rheinhardt2019-10-211-1/+1
| | | | | | | | | | | | | | The Matroska muxer groups index entries with the same pts together in order to save a few bytes. Because of Matroska's variable-length length fields, mkv_write_cues() does this by first finding out how many index entries will be grouped together before actually writing them. Currently, it is asserted at both of these stages that the stream index of the list of designated index entries is valid. But the second assert is redundant, because the very same index entries have already been checked. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: Move track-related fields to mkv_trackAndreas Rheinhardt2019-10-211-26/+15
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: Use ffio_free_dyn_bufAndreas Rheinhardt2019-10-211-17/+6
| | | | | | | instead of replicating its behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: Fix memleak upon failureAndreas Rheinhardt2019-10-211-18/+16
| | | | | | | | | | | | | | | | | The Matroska muxer up until now leaked memory in two scenarios: 1. If an error happened during writing the trailer, as mkv_write_trailer() returned early without cleaning up. 2. If mkv_write_header() indicated success despite an error in the underlying AVIOContext. In this case avformat_write_header() returned the IO error and according to the API the caller is not allowed to call av_write_trailer(), so that no cleanup happened for the allocations made in mkv_write_header(). This has been fixed by using a dedicated deinit function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: free buffered page lists while uninitializing the muxerJames Almer2019-10-211-0/+9
| | | | | | | If the trailer is never writen, there could be buffered pages that would leak. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
OpenPOWER on IntegriCloud