summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avcodec/ttmlenc: Use string literal macro for default namespacingAndreas Rheinhardt2022-07-31
| | | | | | | | Fixes -Werror=format-security build failures when building with disabled optimizations and (according to fate.ffmpeg.org also with several other old GCC versions). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/argo_cvg: expose loop/reverb/checksum via metadataZane van Iperen2022-07-24
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_cvg: remove trace loggingZane van Iperen2022-07-24
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_cvg: add -loop and -reverb optionsZane van Iperen2022-07-24
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_cvg: name unk{1,2} fields correctlyZane van Iperen2022-07-24
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/asfcrypt: Fix wrong array length in function declarationAndreas Rheinhardt2022-07-23
| | | | | | | | | | | | multiswap_step() and multiswap_inv_step() both only require six keys; in all current callers, these keys are part of an array of twelve keys, yet in some of these callers the keys given to these functions point to the second half of these twelve keys, so that only six keys are available to these functions. This led to -Wstringop-overread warnings when compiling with GCC 12.1. Fix these by adapting the declaration of these functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/lrcenc: Avoid reading packet paddingAndreas Rheinhardt2022-07-23
| | | | | | (Everything would be fine if the packet was properly padded.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpc8: Check and propagate more errorsMichael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 48846/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-5278532493770752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvdec: Check for EOF in index readingMichael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 47992/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-6020443879899136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/nutdec: Check get_packetheader() in mainheaderMichael Niedermayer2022-07-21
| | | | | | | | Fixes; Timeout Fixes: 48794/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6524604713140224 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 for EOF in mov_read_iloc()Michael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 49216/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6563000529584128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asfdec_f: Use 64bit for packet start timeMichael Niedermayer2022-07-21
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int' Fixes: 49014/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6314973315334144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* avformat/mov: discard data streams with all zero sample_deltaZhao Zhili2022-07-18
| | | | | | | | | | | | | | | | | Streams with all zero sample_delta in 'stts' have all zero dts. They have higher chance be chose by mov_find_next_sample(), which leads to seek again and again. For example, GoPro created a 'GoPro SOS' stream: Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s (default) Metadata: creation_time : 2022-06-21T08:49:19.000000Z handler_name : GoPro SOS With 'ffprobe -show_frames http://example.com/gopro.mp4', ffprobe blocks until all samples in 'GoPro SOS' stream are consumed first. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/img2dec: fix buildPaul B Mahol2022-07-16
|
* avcodec: add Radiance HDR image format supportPaul B Mahol2022-07-16
|
* Bump versions after 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump Versions for 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtsp: break on unknown protocolsMichael Niedermayer2022-07-12
| | | | | | | | | This function needs more cleanup and it lacks error handling Fixes: use of uninitialized memory Fixes: CID700776 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aaxdec: Check for empty segmentsMichael Niedermayer2022-07-12
| | | | | | | | Fixes: Timeout Fixes: 48154/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5149094353436672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avienc: Check video dimensionsMichael Niedermayer2022-07-12
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/iff: simplify duration calculationMichael Niedermayer2022-07-12
| | | | | | | | Fixes: signed integer overflow: 315680096256 * 134215943 cannot be represented in type 'long long' Fixes: 48713/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5886272312311808 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: fix possible crash in cenc_scheme_decryptShuangxiLi2022-07-12
| | | | | | | | | Data does not have to be decrypted in 16-byte blocks for AES-CTR mode, so existing buggy code can be hugely simplified. Fixes ticket #9829. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/flvenc: Add deinit functionAndreas Rheinhardt2022-07-09
| | | | | | | | Fixes memleaks when the trailer is never written or when shift_data() fails when writing the trailer. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Ensure packet is writable before modifying itAndreas Rheinhardt2022-07-09
| | | | | | | | Fixes e.g. ffmpeg -i fate-suite/h264/bbc2.sample.h264 -c:v rawvideo -map 0:v -frames:v 10 -pix_fmt gray8 -f tee "first.mov|second.mov" Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* av(format|device): Add const to muxer packet data pointersAndreas Rheinhardt2022-07-09
| | | | | | | The packets given to muxers need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Add const where possibleAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Don't modify input packetAndreas Rheinhardt2022-07-09
| | | | | | It might not be writable at this point. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Check fcTL sizeAndreas Rheinhardt2022-07-09
| | | | | | The remaining code relies on it having the value it should have. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Check for incomplete chunksAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/apng: Add APNG_FCTL_CHUNK_SIZE defineAndreas Rheinhardt2022-07-09
| | | | | | Also use it where appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Support for 16:9 DV in QuickTimeBrion Vibber2022-07-09
| | | | | | | | | | | | | | Some files I have from circa year 2000 are 16:9 NTSC DV video encoded as QuickTime with Radius SoftDV. This marked 4:3 videos with the box 'dvc ' for NTSC or 'dvcp' for PAL, which are already supported, but 16:9 videos as 'dvl ' or 'dvlp', which were not. Adding these to the list for DV codec processing gives the expected metadata and playback. I have not tested PAL as I have no sample data, only NTSC. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/sctp: close socket on errorsMichael Niedermayer2022-07-07
| | | | | | | | This is untested as i have no testcase Fixes: CID1302709 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cinedec: Check size and pos moreMichael Niedermayer2022-07-07
| | | | | | | | Fixes: signed integer overflow: 9223372036848019263 + 134232320 cannot be represented in type 'long' Fixes: 48155/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5751429207293952 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/img2enc: use unmatched filename for an invalid or missing sequence ↵Marton Balint2022-07-07
| | | | | | | | | | | pattern Also warn the user that for single images -update should be used, for sequences a proper pattern should be specified. Fixes ticket #9748. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/img2enc: fix first image checkMarton Balint2022-07-07
| | | | | | Start image number was hardcoded to 1 for the first image check. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: disallow a zero sample size in trun atomsMarton Balint2022-07-06
| | | | | | | | | | | In order to not generate 0 sized packets or create a huge index table needlessly. Fixes: Timeout Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Fixes: 45738/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6142535657979904 Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) ↵Marton Balint2022-07-06
| | | | | | | | on stuck empty input parser" Hides the underlying real problem with a demuxer returning 0 sized packets. This reverts commit 02699490c14e86105104940c009953081f69432c.
* Revert "avformat/demux: Count EAGAIN as 100 bytes in relation to read limit ↵Marton Balint2022-07-06
| | | | | | | | | | in avformat_find_stream_info()" Modifying avformat_find_stream_info() behaviour based on the number of EAGAINs it encounters is a hack which usually only hides the real issue if such thing happen. This reverts commit b0cac7082d8a3ff2d4f039af01b45c48bb578de7.
* avformat/mov: prevent potential use of uninitialized valueMartijn van Beurden2022-07-05
|
* avformat/cafdec: Implement FLAC-in-CAF parsingMartijn van Beurden2022-07-05
| | | | | | | | The afconvert utility shipped with MacOS supports muxing of FLAC in CAF, see afconvert help output on a recent Mac here: https://hydrogenaud.io/index.php?topic=122509.0 A file created with afconvert free of copyright (licensed CC0) can be found here: http://www.audiograaf.nl/misc_stuff/afconvert-FLAC-in-CAF.caf
* avformat/matroskadec: fix setting channel layout using the Channels elementJames Almer2022-07-04
| | | | | | | | | | | | | | If the stream's channel layout is first set into a native layout using codec private parameters, this code here could potentially result in an invalid native layout where popcnt(ch_layout.u.mask) != ch_layout.nb_channels being propagated. Fixes: Timeout printing a billion channels Fixes: 48099/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6754782204788736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/(mpeg|mpegts|mxf|sup)enc: Use const uint8_t* to access pkt dataAndreas Rheinhardt2022-07-04
| | | | | | | | | The packets muxers receive are not guaranteed to be writable, so they must not be modified. Ergo only access the packet's data via a const uint8_t*. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: add PHM decoder and encoderPaul B Mahol2022-07-03
|
* avformat/mlpdec: Remove unused-but-set variableAndreas Rheinhardt2022-07-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/bintext: Remove set-but-unused variableAndreas Rheinhardt2022-07-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffdec: cleanup size handling for extreem casesMichael Niedermayer2022-07-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Fix invalid checkAndreas Rheinhardt2022-06-30
| | | | | | | | Regression since c9de096851803d45444ae9dfe3a390a2d53ac71b. Fixes Coverity ID 1506839. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: limit ISOBMFF AC-3 mapping to bsids <=8Jan Ekström2022-06-30
| | | | | | | | | | This leaves out RealAudio DolbyNet, which utilizes bsids 9 and 10, It is not clear whether the interpreted bit rate value (divided by 2 or 4 depending on the variant), or the original bit rate value should be utilized to receive the bit_rate_code index. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/movenc: handle OOM situations when parsing AC-3 headersJan Ekström2022-06-30
| | | | Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>