summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* avformat/tta: Avoid seek when reading headerAndreas Rheinhardt7 days1-22/+19
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/oggdec: Don't skip over data whose checksum is usedAndreas Rheinhardt7 days1-1/+1
| | | | | | | | | | | | | | | | | | The behavior of the ffio_*_checksum feature is not well defined when using avio_skip(). The code in oggdec.c relied on the skipped data (four bytes) to be checksummed, which is mostly true because short_seek_threshold is 32768 by default, so that avio_seek() will normally read data instead of calling the underlying seek function. Yet this has two problems: a) It relies on implementation details of avio_seek(). b) There is an exception, namely if the AVIO_FLAG_DIRECT is set. In this case the underlying seek function (if set) is always called and the data is skipped, leading to CRC errors. So don't skip the data. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/aviobuf: Keep checksum_ptr consistent in avio_seek()Andreas Rheinhardt7 days1-1/+1
| | | | | | | | | | | | Otherwise it might be > buf_ptr in which case ffio_get_checksum() could segfault (s->buf_ptr - s->checksum_ptr would be negative which would be converted to something very big when converted to unsigned for the update_checksum callback). Fixes ticket #11233. Reported-by: Du4t Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/whip: enable RTCP NACK for whipJack Lau7 days1-0/+53
| | | | | | | | | | | | | | | | Refer to RFC 4585 4.2, Add SDP "a=rtcp-fb" so the peer can request rtx through sending NACKs. Add basic parsing for NACK packet. Decrypt into a newly allocated buffer (do not overwrite whip->buf) so multiple NACKs in a bundled packet can be parsed in a loop while keeping whip->buf available for sending rtx Broken or wrong NACk are logged and skipped. Signed-off-by: Jack Lau <[email protected]>
* Update libavformat/apvdec.cdariusz-f14 days1-1/+1
| | | | | Increase au_size limit by 4 times to fit more complex videos. Signed-off-by: dariusz-f <[email protected]>
* avformat/apv: fix range of au_sizeDariusz Frankiewicz14 days1-1/+1
| | | | | | Acces unit size is described in documentation as > 0 < 0xFFFFFFFF Signed-off-by: Dariusz Frankiewicz <[email protected]>
* avformat/mov: fix unused variable entry in parse_exif_itemZhao Zhili2025-09-061-1/+0
|
* avformat/img2dec: support arbitrary path lengthsMarton Balint2025-09-052-24/+33
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/img2dec: remove path limits from find_image_rangeMarton Balint2025-09-051-13/+22
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/img2dec: do not use av_get_frame_filename result buffer if the call ↵Marton Balint2025-09-051-13/+13
| | | | | | | | | | | | | | | | | | | fails We have no way of knowing if the string was fully processed or got truncated because of a parse error so it is better to use the original path if finding an image sequence fails. We do this by explicitly falling back to the PT_NONE mode if the provided filename is not a valid pattern but the file exists or if the IO context is already open. This also means that filenames no longer need to be escaped even in sequence mode if an invalid sequence (a sequence without %d) is provided, so a command line such as ffmpeg -f image2 -i "100%.jpg" will just work, but "100%%.jpg" will no longer work. Signed-off-by: Marton Balint <[email protected]>
* avformat/webm_chunk: support for arbitrary path lengthsMarton Balint2025-09-051-12/+10
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/segment: support arbitrary path lengthsMarton Balint2025-09-051-13/+23
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/utils: support arbitrary path lengths for av_filename_number_testMarton Balint2025-09-051-3/+6
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/utils: add AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION flagMarton Balint2025-09-053-4/+5
| | | | Signed-off-by: Marton Balint <[email protected]>
* avformat/tls_gnutls: cleanup the pointer nameJack Lau2025-09-051-29/+29
| | | | | | | | Pure cleanup, no functional changes Unify local pointer names to `TLSContext *c` and `TLSShared *s` to reduce confusion from inconsistent names (e.g. p, s, c) Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: simplify the udp read in whip_write_packetJack Lau2025-09-051-9/+14
| | | | | | | | Reduce nested if statements to make the code structure clearer Add logic to check if EOF is received from UDP socket. Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: fix potential 8bit overflow for profile_idcJack Lau2025-09-051-6/+5
| | | | | | | The profile contains profile_idc and constraint_set*_flag, throws away high 8 bit flags and then we get profile_idc. Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: fix 8 bits overflow and map constraint_set bits for H264Jack Lau2025-09-051-3/+4
| | | | | | | | | | | | profile_iop is an 8 bits field. Previous code copied AVCodecParameters::profile (which can contain bits beyond 8 bits) into profile_iop, producing overflow and wrong values. This patch maps the constrained flags into the proper profile_iop bits (constraint_set1 / 3) Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: make time measure more preciseJack Lau2025-09-051-25/+25
| | | | | | | | | | Use av_gettime_relative() replace av_gettime() to get better measure Changed the display precision from showing only integers to showing two decimal places (in milliseconds) Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: fix SDP ICE candidates parsingJack Lau2025-09-051-5/+5
| | | | | | | | | | | fix issue #20407 Refer to RFC 5245 15.1, the foundation may be any string up to 32 chars. The old code could misread foundations as transport("udp"). This patch fully parse all these attr to avoid parsing error. Signed-off-by: Jack Lau <[email protected]>
* avformat/whip: add PRIORITY and ICE_CONTROLLING for STUN binding requestJack Lau2025-09-051-2/+27
| | | | | | | | | | | | | fix issue #20402 See RFC 8445 7.1, The PRIORITY and ICE-CONTROLLED or ICE-CONTROLLING must be included in a Binding request. FFmpeg is always ICE Controlling role so we use ICE-CONTROLLING attr. Co-author-by: Sergio Garcia Murillo <[email protected]> Signed-off-by: Jack Lau <[email protected]>
* avformat/demux: Reindent after the previous commitAndreas Rheinhardt2025-09-031-6/+6
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/demux: Avoid always-true branchAndreas Rheinhardt2025-09-031-3/+0
| | | | | | | | Since 9d037c54f209958d47ac376d2a9561608f98dfae id3v2_extra_meta can only be != NULL if the input format wants ID3v2 tags to be read generically. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/avformat: Make AVFMT_FLAG_ID3V2_AUTO privateAndreas Rheinhardt2025-09-037-6/+13
| | | | | | | | | | | | | | | This flag governs whether avformat_open_input() reads ID3v2 tags generically; some demuxers without this flag read these tags themselves in a non-generic way, e.g. oma. This makes this flag an implementation detail that should not be exposed to the user, i.e. an internal flag. Given that 9d037c54f209958d47ac376d2a9561608f98dfae did not bump version and added no APIchanges entry I deemded it inappropriate to bump version or add an APIchanges entry for the removal of AVFMT_FLAG_ID3V2_AUTO. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/demux: avoid unconditional ID3v2 tag consumptionnilfm2025-09-036-6/+11
| | | | | | | | | ID3v2 headers are now only parsed for formats that explicitly support them, avoiding premature data consumption that broke demuxing in other formats. Introduces AVFMT_FLAG_ID3V2_AUTO and applies it to mp3, aac, tta, and wav. Signed-off-by: nilfm <[email protected]>
* avformat/aviobuf: Don't pretend to support avio_context_free(NULL)Andreas Rheinhardt2025-09-031-2/+2
| | | | | | | | | | It makes no sense to ever call it that way given that avio_context_free() accepts a pointer to a pointer to an AVIOContext. Other double-pointer-free functions like av_freep() also do it that way (and therefore avio_context_free(NULL) still crashes even with 870cfed2317e311a71bc14773332486a162f059c). Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/mov: export Exif metadata from HEIF streamsJames Almer2025-09-012-7/+122
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mov: make items referencing items genericJames Almer2025-09-012-38/+38
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mov: reduce code duplication when setting tile group propertiesJames Almer2025-09-011-31/+15
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/dump: print side data type names genericallyJames Almer2025-09-011-30/+15
| | | | | | Based on vf_showinfo behavior. Signed-off-by: James Almer <[email protected]>
* avformat/movenc: remove mvex from final mp4 in hybrid_fragmented modeZhao Zhili2025-09-011-1/+5
| | | | | | In hybrid_fragmented mode, the first moov at start should contain mvex tag, since it's fmp4. When writing the moov at the second time, it's not fmp4 any more, so mvex should be skipped.
* avformat/img2dec: remove deprecated glob_sequence pattern typeMarton Balint2025-08-262-64/+4
| | | | | | | "glob_sequence" was deprecated since 2012. This also changes the default pattern to "sequence", because "glob_sequence" was also the default. Signed-off-by: Marton Balint <[email protected]>
* avformat/whip: set the first sequence number for video and audioJack Lau2025-08-261-0/+7
| | | | | | | | | | | simply whip->audio_first_seq + 1 for video could be faster than generating a new one. this patch will make whip be able to get the first rtp seq easily and compute something sequence-based (e.g. NACK and RTX handling) Signed-off-by: Jack Lau <[email protected]>
* avformat/file: add pkt_size optionyangsen52025-08-252-2/+4
| | | | | | | | | | The min_packet_size/max_packet_size were hardcoded to 256KB for performance. The new option makes it possible to configure a smaller packet size on embedded devices with limited memory resources. Signed-off-by: yangsen5 <[email protected]> Signed-off-by: Zhao Zhili <[email protected]>
* mov demuxer: use int64_t for next_tsMuiz Yusuff2025-08-251-1/+2
| | | | | d1b96c380826c505a8c7e655b5ad4fdb0c2de167 fixes some hevc seeking issues but will int overflow when timestamp is >int_max.
* movenc: ensure chapters track extradata is not null and populatedDamiano Galassi2025-08-241-0/+8
| | | | | | fix a regression introduced in 4eca8df, writing chapters failed if chapters where not available before mov_write_header().
* avformat/whip: fix ssrc might be sameJack Lau2025-08-231-1/+1
| | | | | | | | | | | | | | use audio_ssrc + 1 for video_ssrc to avoid ssrc collision See RFC 3550 Section 8, The SSRC identifier carried in the RTP header and in various fields of RTCP packets is a random 32 bit number that is required to be globally unique within an RTP session. simply + 1 also can get an unique ssrc, and faster than generating new unique ssrc. Signed-off-by: Jack Lau <[email protected]>
* avformat/tcp: add option for enabling TCP keepaliveiddq2025-08-221-0/+11
|
* avformat/avidec: use new EXIF metadata API instead of avpriv_Leo Izen2025-08-191-4/+10
| | | | | | | | This commit switches avidec to use the new metadata API exposed by the previous commit instead of relying on the existing avipriv_ function exposed by lavc. Signed-off-by: Leo Izen <[email protected]>
* avcodec/tiff_common: rename TIFF enum constantsLeo Izen2025-08-191-5/+5
| | | | | | | | | | This makes the enum TiffTypes public by moving it to the public header exif.h and renaming it to AVTiffDataType, as well as adding an AV_ prefix in front of each of the entry names. This allows callers to use enum AVTiffDataType without pulling in all of tiff_common.h, as that header is not public. Signed-off-by: Leo Izen <[email protected]>
* avformat/lrcdec: Fix fate-sub-lrc-ms-remux on x86-32Michael Niedermayer2025-08-181-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/avio: clarify that AVSEEK_FORCE has no effectValerii Zapodovnikov2025-08-172-8/+6
| | | | | | | | | | | | | | avio_seek() never supported SEEK_END and returned AVERROR(EINVAL) when specified, so the later check "(whence != SEEK_END || force)" was always true. This also means that AVSEEK_FORCE had no effect since 7a6fe01f99, that is 15 years ago. Rather than changing behaviour, let's document instead that the flag has no effect. Also fixed other commit 41ed7ab45f which confused ORing / passing AVSEEK_FORCE and AVSEEK_SIZE in the docs. Signed-off-by: Valerii Zapodovnikov <[email protected]>
* avformat/mov: pass stream index to sanity_checks on HEIF imagesJames Almer2025-08-161-1/+1
| | | | | | Instead of item_id. Same behavior as with standard video tracks. Signed-off-by: James Almer <[email protected]>
* avformat/mov: don't use an allocated array for sample_size with HEIF imagesJames Almer2025-08-161-6/+4
| | | | | | | | | | | | The array is only ever needed for streams where each sample entry may have a different value. Given that for non animated HEIF there's a single value that applies to the image, use the field defined for that. Fixes: NULL pointer dereference Fixes: 437528618/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6537287645331456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: James Almer <[email protected]>
* avformat/whip: remove DTLSState enumJack Lau2025-08-164-77/+13
| | | | | | | | | This patch aims to simplify the dtls handshake process since dtls handshake use force block mode We can just use the return code instead of DTLSState enum Signed-off-by: Jack Lau <[email protected]>
* avformat/tls_openssl: simplify fingerprint generationKacper Michajłow2025-08-161-47/+16
| | | | Signed-off-by: Kacper Michajłow <[email protected]>
* avformat/tls_openssl: clean keys serializationKacper Michajłow2025-08-161-71/+36
| | | | | | | | | It was unnecessary convoluted, remove not needed memory allocations, snprintf. Also fixes posibility to call snprinft with NULL as %s input. Signed-off-by: Kacper Michajłow <[email protected]>
* avformat/tls_openssl: use ascii - (0x2D) instead of 0x2010 hyphenKacper Michajłow2025-08-161-5/+5
| | | | | | | Too much AI is bad for you... Fixes: 167e343bbe75515a80db8ee72ffa0c607c944a00 Signed-off-by: Kacper Michajłow <[email protected]>
* avformat/apngdec: allow other chunks between fcTL and fdAT/IDATdevjeonghwan2025-08-141-4/+7
|
* avformat/aviobuf: Free white/black list in avio_context_free()Andy Nguyen2025-08-131-0/+5
| | | | Signed-off-by: Michael Niedermayer <[email protected]>