summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/mpegtsenc: add AVSV format_identifier for AVS standardLimin Wang2021-10-20
| | | | | | | Listing of Registered Identifiers: https://smpte-ra.org/registered-mpeg-ts-ids Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegts: add support for stream_type 0xd4, which is AVS3Limin Wang2021-10-20
| | | | | | | | GB/T 17975.1 Information technology-Generic coding of moving pictures and associated audio information-Part 1:Systems Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegts: add support for stream_type 0xd2, which is AVS2Limin Wang2021-10-19
| | | | | | | | GB/T 17975.1 Information technology-Generic coding of moving pictures and associated audio information-Part 1:Systems Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: add raw avs3 muxerLimin Wang2021-10-19
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* seek: Fix crashes in ff_seek_frame_binary if built with latest Clang 14Martin Storsjö2021-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | Passing an uninitialized variable as argument to a function is undefined behaviour (UB). The compiler can assume that UB does not happen. Hence, the compiler can assume that the variables are never uninitialized when passed as argument, which means that the codepaths that initializes them must be taken. In ff_seek_frame_binary, this means that the compiler can assume that the codepaths that initialize pos_min and pos_max are taken, which means that the conditions "if (sti->index_entries)" and "if (index >= 0)" can be optimized out. Current Clang git versions (upcoming Clang 14) enabled an optimization that does this, which broke the current version of this function (which intentionally left the variables uninitialized, but silencing warnings about being uninitialized). See [1] for discussion on the matter. [1] https://reviews.llvm.org/D105169#3069555 Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/rtpdec_rfc4175: add support for RANGELimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: add support for colorimetryLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: add support for TCSLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: add support for exactframerateLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/argo_asf: use title metadata when muxingZane van Iperen2021-10-15
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: pass name through as metadataZane van Iperen2021-10-15
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: cleanup and NULL-terminate name field in headerZane van Iperen2021-10-15
| | | | | | | Preparation for metadata changes in the following patches. Saves having to create an extra buffer. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/westwood_vqa: Store VQFL codebook chunksPekka Väänänen2021-10-14
| | | | | | | High color 15-bit VQA3 video streams contain high level chunks with only codebook updates that shouldn't be considered new frames. Now the demuxer stores a reference to such VQFL chunks and returns them later along with a VQFR chunk with full frame data.
* avformat/dhav: make duration extraction more robustPaul B Mahol2021-10-13
|
* avformat/dhav: check if timestamp matches when seekingPaul B Mahol2021-10-13
|
* libavformat/hls: correct indentationNachiket Tarate2021-10-13
| | | | | Signed-off-by: Nachiket Tarate <nachiket.programmer@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* libavformat/hls: add support for decryption of HLS media segments encrypted ↵Nachiket Tarate2021-10-13
| | | | | | | | | | | using SAMPLE-AES encryption method Apple HTTP Live Streaming Sample Encryption: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption Signed-off-by: Nachiket Tarate <nachiket.programmer@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* libavformat/mov: add support for 'cens', 'cbc1' and 'cbcs' encryption ↵Nachiket Tarate2021-10-13
| | | | | | | | | | | | schemes specified in Common Encryption (CENC) standard correct implementation of 'cenc' encryption scheme to support decryption of partial cipher blocks at the end of subsamples https://www.iso.org/standard/68042.html Signed-off-by: Nachiket Tarate <nachiket.programmer@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rtpdec_rfc4175: return the proper valueLimin Wang2021-10-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: Remove redundant initializationLimin Wang2021-10-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: use av_get_bits_per_pixel()Limin Wang2021-10-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/libsrt: add snddropdelay parameter for srtLimin Wang2021-10-11
| | | | | Reviewed-by: "zhilizhao(赵志立)" <quinkblack@foxmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/librist: replace deprecated functionsGijs Peskens2021-10-10
| | | | | | | | | | | This gets rid of of rist_receiver_data_read, rist_receiver_data_block_free and rist_parse_address these functions have been deprecated since librist release v0.2.1 and are replaced with functions suffixed with 2. I added a version macro check at the top of the file to ensure ffmpeg can still be compiled against older versions. Signed-off-by: Gijs Peskens <gijs@peskens.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: fix max_packet_size in mpegts payload parsingMarton Balint2021-10-10
| | | | | | | | | | | | | | | | | The maximum allowed useful PES payload data was set to PES_packet_length, but it is in fact smaller by the length of the PES header. This changes how corrupt streams are packetized: - If PES header length is bigger than PES_packet_length then the PES packet payload will be handled as an unbound packet - PES packets with payload across multiple MPEGTS packets will always be splitted if with the next chunk of data the payload should exceed PES_packet_length, previously a PES_header_length amount of excess was allowed. Fixes ticket #9355. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: rename PES total_size to PES_packet_lengthMarton Balint2021-10-10
| | | | | | | | | This renames PESContext->total_size to PESContext->PES_packet_length and keeps it 0 for unbound packets, so its name and semantics will match the standard. There should be no change in functionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: delay allocation of PES bufferMarton Balint2021-10-10
| | | | | | This allows us to allocate the buffer in a single code path. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: use named constants for stream_id typesMarton Balint2021-10-10
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/libsrt: specify base of maxbw string to 10 instead of auto-detectLimin Wang2021-10-10
| | | | | | Make all options string conversion consistent. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/libsrt: use strtoll/strtol for int64_t/intLimin Wang2021-10-10
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/matroskadec: Reset state also on failure in matroska_reset_status()Michael Niedermayer2021-10-09
| | | | | | | | | | | The calling code does not handle failures and will fail with assertion failures later. Seeking can always fail even when the position was previously read. Fixes: Assertion failure Fixes: 35253/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-4693059982983168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/allformats: Fix data race when accessing devices listsAndreas Rheinhardt2021-10-09
| | | | | | | | | | | | | | | | | | Up until now setting the input and output devices lists is guarded by a mutex. This prevents data races emanating from multiple concurrent calls to avpriv_register_devices() (triggered by multiple concurrent calls to avdevice_register_all()). Yet reading the lists pointers was done without any lock and with nonatomic variables. This means that there are data races in case of concurrent calls to av_(de)muxer_iterate() and avdevice_register_all() (but only if the iteration in av_(de)muxer_iterate exhausts the non-device (de)muxers). This commit fixes this by putting said pointers into atomic objects. Due to the unavailability of _Atomic the object is an atomic_uintptr, leading to ugly casts. Switching to atomics also allowed to remove the mutex currently used in avpriv_register_devices(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/wavdec: Check smv_block_sizeMichael Niedermayer2021-10-09
| | | | | | | | Fixes: Timeout Fixes: 39554/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-4915221701984256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Check for multiple audio_stream_infoMichael Niedermayer2021-10-09
| | | | | | | | Fixes: memleak Fixes: 39166/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5153276690038784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/img2dec: add GEM Raster image demuxerPeter Ross2021-10-08
| | | | Signed-off-by: Peter Ross <pross@xvid.org>
* oavformat/avidec: Check offset in odmlMichael Niedermayer2021-10-07
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long' Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegts: use actually read packet size in mpegts_resync special caseMichael Niedermayer2021-10-07
| | | | | | | | | Fixes: infinite loop Fixes: 37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528 - Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flacdec: Also set channels when setting channel_layoutAndreas Rheinhardt2021-10-07
| | | | | | | | | This brings the FLAC demuxer in line with all the other demuxers. Furthermore, if it is not done and the FLAC decoder is disabled, the FLAC parser will overwrite the channel layout with the standard channel layout for that number of channels. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/format: Improve const-correctnessAndreas Rheinhardt2021-10-07
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/lrcenc: Unify writing timestampsAndreas Rheinhardt2021-10-07
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/lrcenc: Avoid allocations for writing packet dataAndreas Rheinhardt2021-10-07
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/sccdec: Remove nonsense castAndreas Rheinhardt2021-10-07
| | | | | | | | In most contexts, arrays are automatically converted to a pointer to their first element; taking the address of the array just yields a pointer to an array of fixed-size arrays, which is not intended here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/{isom,mov,movenc}: add support for CMAF DASH rolesJan Ekström2021-10-04
| | | | | | | | | | | | | | | | This information is coded in a standard MP4 KindBox and utilizes the scheme and values as per the DASH role scheme defined in MPEG-DASH. Other schemes are technically allowed, but where multiple schemes define the same concepts, the DASH scheme should be utilized. Such flagging is additionally utilized by the DASH-IF CMAF ingest specification, enabling an encoder to inform the following component of the roles of the incoming media streams. A test is added for this functionality in a similar manner to the matroska test. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/{aviobuf,avio_internal}: add max_len argument to ↵Jan Ekström2021-10-04
| | | | | | | | | | ff_read_string_to_bprint_overwrite This is especially useful when reading things such as null-terminated strings from MOV/MP4-likes, where the size of the box is known, but not the exact size of the string. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/{aviobuf,avio_internal}: add ff_read_string_to_bprint_overwriteJan Ekström2021-10-04
| | | | | | | For now, same as ff_read_line_to_bprint_overwrite, but reads until the end of a null-terminated string. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/aviobuf: add a full string reading mode to read_line_to_bprintJan Ekström2021-10-04
| | | | | | | | | | Additionally: * rename it to read_string_to_bprint * split most of ff_read_line_to_bprint_overwrite into an internal function which can then be utilized to implement other functionality without duplicating code. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/mux: Remove unnecessary av_packet_unref()Andreas Rheinhardt2021-10-03
| | | | | | AVFormatInternal.parse_pkt is always blank after having been used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/tee: ReindentationAndreas Rheinhardt2021-10-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/tee: Process strings immediately if possibleAndreas Rheinhardt2021-10-03
| | | | | | This avoids having to free them manually lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/tee: Fix leak of FIFO-options dictionaryAndreas Rheinhardt2021-10-03
| | | | | | Happened for all slaves which didn't use the FIFO. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/tee: Fix leak of stringsAndreas Rheinhardt2021-10-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>