summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* avformat/gdv: Check fpsMichael Niedermayer2019-03-141-0/+3
| | | | | | | | | | Fixes: Division by 0 Fixes: ffmpeg_zero_division.bin Found-by: Anatoly Trosinenko <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 38381400fca45d1ae6e7604335b507b7dc70a903) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/webmdashenc: Check id in adaption_setsMichael Niedermayer2019-03-141-0/+6
| | | | | | | | | Fixes: out of array access Found-by: Wenxiang Qian Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit b687b549aa0fb115861b1343208de8c2630803bf) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/http: Fix Out-of-Bounds access in process_line()Wenxiang Qian2019-03-141-1/+1
| | | | | | Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 85f91ed760a517c0d5fcf692d40a5a9d7efa9476) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393Wenxiang Qian2019-03-141-1/+1
| | | | | | Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit a142ffdcaec06fcbf7d4b00dbb0e5ddfb9e3344d) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/matroskadec: Do not leak queued packets on sync errorsMichael Niedermayer2019-03-141-1/+1
| | | | | | | | | | | Fixes: memleak Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280 Reported-by: Chris Cunningham <[email protected]> Tested-by: Chris Cunningham <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit d1afa7284c3feba4debfebf1b9cf8ad67640e34a) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Do not use reference stream in mov_read_sidx() if there is no ↵Michael Niedermayer2019-03-141-1/+1
| | | | | | | | | | | | reference stream Fixes: NULL pointer dereference Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088 Reported-by: Chris Cunningham <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit b0d8b7cb8e86367178ef0c35dcae359d820c3b27) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: fix hang while seek on a kind of fragmented mp4Charles Liu2019-02-111-9/+12
| | | | | | | | | | | | | | | | | | | | Binary searching would hang if the fragment items do NOT have timestamp for the specified stream. For example, a fmp4 consists of separated 'moof' boxes for each track, and separated 'sidx' for each segment, but no 'mfra' box. Then every fragment item only have the timestamp for one of its tracks. Example: ffmpeg -f lavfi -i testsrc -f lavfi -i sine -movflags dash+frag_keyframe+skip_trailer+separate_moof -t 1 out.mp4 ffmpeg -ss 0.5 -i out.mp4 -f null none Also fixes the hang in ticket #7572, but not the reason for having AV_NOPTS_VALUE timestamps there. Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Marton Balint <[email protected]> (cherry picked from commit aa25198f1b925a464bdfa83a98476f08d26c9209)
* avformat/async: fix assertion condition when draining bufferMarton Balint2019-02-111-1/+1
| | | | | | | | | Fixes some random assertion failures with ffprobe -show_packets async:samples/ffmpeg-bugs/trac/ticket6132/Samsung_HDR_-_Chasing_the_Light.ts > /dev/null Signed-off-by: Marton Balint <[email protected]> (cherry picked from commit 4b46d1ee463f6bb2d2be967d418d275a44fe2a9c)
* avformat/mov: validate chunk_count vs stsc_datachcunningham2019-02-081-2/+12
| | | | | | | | | | | | Bad content may contain stsc boxes with a first_chunk index that exceeds stco.entries (chunk_count). This ammends the existing check to include cases where chunk_count == 0. It also patches up the case when stsc refers to unknown chunks, but stts has no samples (so we can simply ignore stsc). Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 1c15449ca9a5bfa387868ac55628397273da761f) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov.c: require tfhd to begin parsing trunchcunningham2019-02-082-0/+11
| | | | | | | | | | | | Detecting missing tfhd avoids re-using tfhd track info from the previous moof. For files with multiple tracks, this may make a mess of the avindex and fragindex, which can later trigger av_assert0 in mov_read_trun(). Reviewed-by: Derek Buitenhuis <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 3ea87e5d9ea075d5b3c0f4f8c6c48e514b454cbe) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/rtsp: Check number of streams in sdp_parse_line()Michael Niedermayer2019-01-311-1/+4
| | | | | | | | | | Fixes: OOM Found-by: Michael Hanselmann <[email protected]> Reviewed-by: Michael Hanselmann <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 497c9b0cce559d43607bbbd679fe42f1d7e9040e) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()Michael Niedermayer2019-01-311-1/+2
| | | | | | | | | | Fixes: Infinite loop Found-by: Michael Hanselmann <[email protected]> Reviewed-by: Michael Hanselmann <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 0b50f27635f684ec0526e9975c9979f35bbf486b) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/libopenmpt: Fix successfull typoMichael Niedermayer2019-01-211-1/+1
| | | | | | | Reviewed-by: Lou Logan <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 571af98a5959d72c65a6753eb8e82cde407f4cd0) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/wvdec: detect and error out on WavPack DSD filesDavid Bryant2019-01-211-0/+6
| | | | | | | Not currently supported. (cherry picked from commit db109373d87b1fa5fe9f3d027d1bb752f725b74a) Signed-off-by: Michael Niedermayer <[email protected]>
* libavformat/mov: Fix NULL-dereference read for some encrypted content.Jacob Trimble2019-01-211-3/+3
| | | | | | | | | | | | | | When reading frames, we need to use the fragment for the correct stream. Sometimes the "current" fragment is not the same as the one the frame is for. Found by Chromium's ClusterFuzz: https://crbug.com/906392 and https://crbug.com/915524 Signed-off-by: Jacob Trimble <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 555f332e7adbd492ca74fa7329c492819b52e2ed) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mpegts: Fix side data type for stream idMichael Niedermayer2019-01-211-1/+1
| | | | | | Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit ab1319d82f0c77308792fa2d88cbfc73c3e47cb7) Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/id3v2: fail read_apic on EOF reading mimetypechcunningham2019-01-211-2/+4
| | | | | | | | | | avio_read may return EOF, leaving the mimetype array unitialized. fail early when this occurs to avoid using the array in an unitialized state. Reviewed-by: Tomas Härdin <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit ee1e39a576977fd38c3b94fc56125d31d38833e9) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/nutenc: Document trailer index assert betterMichael Niedermayer2019-01-211-1/+1
| | | | | | | Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 3a95b73abc868995b08ca2b4d8bbf2cda43184f8) Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/mov: ensure only one tkhd per trakchcunningham2019-01-211-1/+11
| | | | | | | | | | | | Chromium fuzzing produced a whacky file with extra tkhds. This caused an AVStream that was already in use to be corrupted by assigning it a new id, which blows up later in mov_read_trun because the MOVFragmentStreamInfo.index_entry now points OOB. Reviewed-by: Baptiste Coudurier <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit c9f7b6f7a9fdffa0ab8f3aa84a1f701cf5b3a6e9) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/movenc: get number of written bytes from bitstream writerPaul B Mahol2018-11-261-1/+1
| | | | | | Update fate test. (cherry picked from commit 97d1ee437bbf67d7e3897bc73df4f7d9771ac309)
* avformat/movenc: fix size calculation in mov_write_eac3_tag()Paul B Mahol2018-11-261-1/+1
| | | | | | Otherwise it would assert when flushing bits. (cherry picked from commit 027f032bbce9bdf7bbec40665b98590cade33416)
* avformat/ivfenc: use the av1_metadata bsf to insert Temporal Delimiter OBUs ↵James Almer2018-11-041-0/+2
| | | | | | | | if needed Reviewed-by: Mark Thompson <[email protected]> Signed-off-by: James Almer <[email protected]> (cherry picked from commit 2d2af23349cae0d84c8ed51c249bfc1e6f2e28a2)
* avformat/ftp: allow nonstandard 202 reply to OPTS UTF8Marton Balint2018-11-041-2/+3
| | | | | | | Fixes ticket #7481. Signed-off-by: Marton Balint <[email protected]> (cherry picked from commit 8e5a2495a8dad262e0a00fbca09b7779b4ebf0bf)
* Bump minor versions for branching 4.1Michael Niedermayer2018-11-021-2/+2
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/ftp: return AVERROR_EOF for EOFMarton Balint2018-11-011-2/+2
| | | | | | Without this FTP just hangs on eof... Signed-off-by: Marton Balint <[email protected]>
* avformat/hlsenc.c: fix the output's duration smaller than input's in ↵Charles Liu2018-10-301-2/+1
| | | | | | | | | | sub-range mode. In fmp4 & sub-range mode, the output's duration always smaller than expected, because the size of the last #EXT-X-BYTERANGE is too small. Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Steven Liu <[email protected]>
* avformat/hlsenc.c: the size of init.mp4 is zero.Charles Liu2018-10-301-0/+19
| | | | | | | | | | The size of init.mp4 is zero in fmp4 mode, when the input duraton smaller than the expected segment time. fix ticket: 7166 Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Steven Liu <[email protected]>
* avformat/hlsenc.c: remove the useless variable fmp4_init_mode.Charles Liu2018-10-301-4/+0
| | | | | Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Steven Liu <[email protected]>
* avformat/hlsenc.c: fix memory leak in fmp4 mode.Charles Liu2018-10-301-0/+1
| | | | | Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Steven Liu <[email protected]>
* avformat/hlsenc: fix the duration of m4s segment is unusually smaller than ↵Charles Liu2018-10-301-4/+0
| | | | | | | | | | expected. In fmp4 mode, the duration of the second m4s segment is unusually smaller than the expected segment time. Signed-off-by: Charles Liu <[email protected]> Signed-off-by: Steven Liu <[email protected]>
* avformat/rpl: Support files containing 8 bit PCM or VIDC audioCameron Cawley2018-10-261-1/+16
| | | | Signed-off-by: Cameron Cawley <[email protected]>
* avcodec: Implement Archimedes VIDC encoder/decoderCameron Cawley2018-10-264-0/+10
| | | | Signed-off-by: Cameron Cawley <[email protected]>
* avformat/dashenc: Support HTTP persistent for init segments as well[email protected]2018-10-261-2/+5
|
* avformat/mxfenc: simplify dnxhd handling and add more flavorsBaptiste Coudurier2018-10-241-155/+63
|
* avformat/libsrt: add several options supported in srt 1.3.0Matsuzawa Tomohiro2018-10-232-1/+59
| | | | | | | | | | Several SRT options are missing. Since pkg_config requires libsrt v1.3.0 and above, it should be able to support options added in libsrt v1.3.0 and below. This commit adds 8 SRT options. sndbuf, rcvbuf, lossmaxttl, minversion, streamid, smoother, messageapi and transtype The keys of option are equivalent to stransmit. https://github.com/Haivision/srt/blob/v1.3.0/apps/socketoptions.hpp#L196-L223 Signed-off-by: Marton Balint <[email protected]>
* lavf/vc1test: add rcv to vc1test demuxer extensionsJun Zhao2018-10-221-0/+1
| | | | | | rcv is commonly used as extension for vc1 test stream files. Signed-off-by: Jun Zhao <[email protected]>
* lavf/vc1test: fix vc1test can't probe some RCV file.Jun Zhao2018-10-221-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | case 1: use the hexdump -C SMM0005.rcv get: size skip (size - 4) | | V V 00000000 18 00 00 c5 05 00 00 00 4d f1 0a 11 00 e0 01 00 00000010 00 d0 02 00 00 0c 00 00 00 88 13 00 00 c0 65 52 ^ | size + 16 case 2: same the command for SMM0015.rcv get: size | V 00000000 19 00 00 c5 04 00 00 00 41 f3 80 01 40 02 00 00 00000010 d0 02 00 00 0c 00 00 00 00 00 00 10 00 00 00 00 ^ | size + 16 There are different the RCV file format for VC-1, vc1test just handle the case 2 now, this fix will support the case 1. (Both of test clips come from: SMPTE Recommended Practice - VC-1 Decoder and Bitstream Conformance). And I think I got a older VC-1 test clip in the case 1. Reviewed-by: Carl Eugen Hoyos <[email protected]> Reviewed-by: Jerome Borsboom <[email protected]> Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Jun Zhao <[email protected]> Signed-off-by: Yan, FengX <[email protected]>
* avformat/dashenc: URL close unconditionally after DELETE segments[email protected]2018-10-211-1/+1
| | | | | | Fixes bug with HTTP DELETE when HTTP Persistent is ON. Right now, HTTP Persistent connections is supported only for POSTs and PUTs. HTTP DELETE will still open a new connection every time.
* avformat/dashenc: Support HTTP Persistent for master.m3u8 as well[email protected]2018-10-211-5/+6
|
* lavf/matroskadec: Simplify string length calculation.Carl Eugen Hoyos2018-10-191-3/+3
| | | | FFmpeg relies on sizeof(char) == 1.
* lavf/dump: Fix a typo: comentary -> commentary.Carl Eugen Hoyos2018-10-192-2/+2
| | | | Fixes ticket #7499.
* avformat/dashenc: Dont ignore the codec tag from codec parametersKarthick Jeyapal2018-10-181-1/+3
|
* avformat/utils: Never store negative values in last_IP_durationMichael Niedermayer2018-10-181-2/+3
| | | | | | | | Fixes: integer overflow compute_pkt_fields() Fixes: compute_pkt_usan Reported-by: Thomas Guilbert <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/utils: Fix integer overflow in discontinuity checkMichael Niedermayer2018-10-181-1/+1
| | | | | | | | Fixes: signed integer overflow: 7738135736989908991 - -7954308516317364223 cannot be represented in type 'long' Fixes: find_stream_info_usan Reported-by: Thomas Guilbert <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/mxfenc: Remove a write-only variable.Carl Eugen Hoyos2018-10-171-6/+1
| | | | | Fixes the following warning: libavformat/mxfenc.c:2125:22: warning: variable 'frame_size' set but not used
* avformat/xwma: fix WMAv2 with incorrect bit ratebnnm2018-10-171-7/+31
| | | | | | | | | | Fixes trac issue #7215 Output for files created by xWMAEncode and various videogames is correct now. 1ch 32000hz files are still broken, would need fixes in WMA decoder. Signed-off-by: bnnm <[email protected]>
* avformat: add SER demuxerPaul B Mahol2018-10-134-2/+150
|
* lavf/mxfenc: Remove two unused variables.Carl Eugen Hoyos2018-10-131-2/+2
| | | | | | Fixes the following warnings: libavformat/mxfenc.c:2036:9: warning: unused variable 'i' libavformat/mxfenc.c:2125:9: warning: unused variable 'i'
* lavf/mxfdec: demux s436m as eia608 subtitle trackBaptiste Coudurier2018-10-121-0/+106
|
* lavf/mxfenc: support creating s436m data tracksBaptiste Coudurier2018-10-123-5/+49
|