summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/flacdec: Remove useless packetAndreas Rheinhardt2019-11-17
| | | | | | | | | | | flac_read_timestamp() applied av_init_packet() to a packet (which initializes all fields of the packet except for data and size) and then went on to use only the data and size fields. In other words: Said packet can be removed and replaced by an uint8_t * and an int. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/Makefile: Specify sln demuxer requirements.Carl Eugen Hoyos2019-11-17
| | | | Mentioned in ticket #8378.
* lavf/rtmpproto: fix the playpath truncation if the len > 512Jun Zhao2019-11-17
| | | | | | | | fix the playpath truncation if the len > 512 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Found-by: liuwenhuang <liuwenhuang@tencent.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/mp3dec: Check for occurances of headers within frames during probingLimin Wang2019-11-16
| | | | | | | Fixes misdetection of zYLx.wav Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mp3dec: Check that the frame fits within the probe bufferMichael Niedermayer2019-11-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: fix typo in help textZhao Zhili2019-11-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/av1dec: simplify annexb_probe()James Almer2019-11-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: Redo flushing of bsfAndreas Rheinhardt2019-11-14
| | | | | | | | | | | | | | The current approach has two different calls to av_bsf_send_packet(): A normal one, sending a packet; and an extraordinary one just for flushing. These can be unified into one by making use of the newly documented fact that av_bsf_send_packet() allows to signal flushing via empty packets (i.e. packets without data and side-data). This also fixes CID 1455685 which resulted from the fact that the call for flushing was not checked given that it couldn't fail. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/id3v2: Avoid av_strdup for key and value of dictAndreas Rheinhardt2019-11-13
| | | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: correctly set width values for dvcprohdBaptiste Coudurier2019-11-13
|
* avformat/hlsenc: free the original malloc pointer to avoid error when system ↵Limin Wang2019-11-13
| | | | | | function used in the following patch Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/hls: continue to play enabled playlist when have failed playlistSteven Liu2019-11-13
| | | | | | fix ticket: 7811 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat: add an AV1 Annex B demuxerJames Almer2019-11-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mp3dec: replace SAME_HEADER_MASK with MP3_MASKLimin Wang2019-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mp3 header bitstream syntax: header() { syncword 12bits bslsf id 1bit bslsf layer 2bit bslsf protection_bit 1bit bslsf bitrate_index 4bits bslsf sampling_frequency 2bits bslsf padding_bit 1bit bslsf private_bit 1bit bslsf mode 2bits bslsf mode_extension 2bits bslsf copyright 1bit bslsf original/home 1bit bslsf emphasis 2bits bslsf } if the header is masking with MP3_MASK(0xFFFE0CCF), below fields will be cleared: protection_bit, bitrate_index, sampling_freqency, mode with SAME_HEADER_MASK(0xFFFE0C00), extra below fields will be cleared which didn't make sense: mode_extension, copyright, original/home, emphasis As the MP3_MASK is good for same mp3 header masking and is defined in the header, so it's preferable to remove SAME_HEADER_MASK to keep the masking same. Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mp3dec: cosmeticsLimin Wang2019-11-11
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvenc: Check pts for mpeg4/h264 (which need the value)Michael Niedermayer2019-11-09
| | | | | | Fixes: Ticket8152 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vividas: Fix n_sb_blocks CheckMichael Niedermayer2019-11-09
| | | | | | | | 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-09
| | | | | | 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-08
| | | | | | | | 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-08
| | | | | | | 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-08
| | | | | | | 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-08
| | | | | | | 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-08
| | | | | | fix indentation Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/mov: add log context dump in log messageJun Zhao2019-11-08
| | | | | | | 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-08
| | | | | | 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-05
| | | | | | | | | | | | | | 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-04
| | | | | 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-04
| | | | | 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-04
| | | | | 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-04
| | | | | | Simplify the check conditions Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/mpegtsenc: fix logic check errorJun Zhao2019-11-04
| | | | | | | | | 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-03
| | | | | | | | | | | | | | | | | 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-03
| | | | | | | 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-01
| | | | | | | | | | | | | | | | 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-31
| | | | | | | 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-30
| | | | | | | | | | 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-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-29
| | | | | | | | 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-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/swfdec: fix memleak when inflateInit failedSteven Liu2019-10-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/smacker: fix memleak when avformat_new_stream failedSteven Liu2019-10-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rtmpproto: fix memleak when open rtmp failedSteven Liu2019-10-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rl2: fix memleak when read end of fileSteven Liu2019-10-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mpc8: fix memleak when seek table too bigSteven Liu2019-10-28
| | | | | 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-28
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: move freep segment from sls_flags_filename_process after ↵Steven Liu2019-10-28
| | | | | | caller failed Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/avienc: Remove superfluous headerAndreas Rheinhardt2019-10-25
| | | | | | | | | 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-25
| | | | | | | | | | | 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-25
| | | | | | | | | 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-25
| | | | | | | 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>