aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* avformat/mux: Rename FF_FMT_ALLOW_FLUSH->FF_OFMT_FLAG_ALLOW_FLUSHAndreas Rheinhardt2024-03-2210-27/+35
| | | | | | | It better reflects that this is a muxer-only flag. Also document the flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavformat/westwood_audenc: Use proper logcontextAndreas Rheinhardt2024-03-221-3/+3
| | | | | | (AVStream did not have an AVClass when this muxer was added.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mp3enc: Improve query_codecAndreas Rheinhardt2024-03-221-1/+5
| | | | | | | Signal that anything except MP3 and the ID3V2 attached pic types are forbidden. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flvenc: Avoid avio_write(pb, "", 0)Andreas Rheinhardt2024-03-221-0/+3
| | | | | | | | | When the compiler chooses to inline put_amf_string(pb, ""), the avio_write(pb, "", 0) can be avoided. Happens with Clang-17 with -O1 and higher and GCC 13 with -O2 and higher here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamf_reader: propagate avio_skip() error valuesJames Almer2024-03-211-4/+2
| | | | | | | | Fixes: null pointer derference Fixes: 67007/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6522819204677632 Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: only compile avif_write_trailer() when the avif muxer is ↵James Almer2024-03-201-0/+2
| | | | | | enabled Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/codec2: Don't allocate Codec2Context for muxerAndreas Rheinhardt2024-03-201-1/+0
| | | | | | | Only the demuxers use it. Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamfenc: Remove unused headersAndreas Rheinhardt2024-03-201-5/+0
| | | | | | | Forgotten in c95c8a0158073be84338d84c46529561bcc70a03. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamfenc: Align check and error messageAndreas Rheinhardt2024-03-201-1/+1
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamfenc: Remove always-false checkAndreas Rheinhardt2024-03-201-5/+0
| | | | | | | | This muxer does not have the AVFMT_NOSTREAMS flag; therefore it is checked generically that there is at least a stream. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroska: use named constants for ITU-T T.35 metadataJames Almer2024-03-192-3/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/aeadec: Use sample rate as time baseAndreas Rheinhardt2024-03-191-0/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aeadec: Export titleAndreas Rheinhardt2024-03-191-3/+12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flvenc: support enhanced flv PacketTypeMetadataZhu Pengfei2024-03-181-0/+139
| | | | | Signed-off-by: Zhu Pengfei <411294962@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/flvdec: support enhanced flv PacketTypeMetadataZhu Pengfei2024-03-181-1/+176
| | | | | Signed-off-by: Zhu Pengfei <411294962@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/crypto: Avoid cast, use proper printf specifierAndreas Rheinhardt2024-03-181-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aeaenc: Fix printf-specifierAndreas Rheinhardt2024-03-181-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Usw avio_wb32() where possibleAndreas Rheinhardt2024-03-171-6/+6
| | | | | | AIFF is a big-endian format, so this is more natural. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Simplify padding tagAndreas Rheinhardt2024-03-171-4/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamf: Mark symbols as hiddenAndreas Rheinhardt2024-03-171-0/+3
| | | | | | | | | Avoids .got entries for ff_iamf_scalable_ch_layouts and ff_iamf_sound_system_map (whether they would have been created otherwise depends upon the compiler and compiler options). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfdec: signal channel layouts using the new channel layout apiMarton Balint2024-03-161-76/+51
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov_chan: simplify channel layout canonicalizationMarton Balint2024-03-161-8/+4
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/pcm: decrease target audio frame per sec to 10Marton Balint2024-03-161-1/+1
| | | | | | | | | | This makes the wav and pcm demuxer demux bigger packets, which is more efficient. As a side effect of the bigger packets, audio durations can become less exact for command lines such as "ffmpeg -i $INPUT -c:a copy -t 1.0 $OUTPUT". Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/wavdec: use ff_pcm_default_packet_size for the default packet sizeMarton Balint2024-03-161-9/+2
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/pcm: factorize and improve determining the default packet sizeMarton Balint2024-03-162-12/+30
| | | | | | | | | | | | | | - Remove the 1024 cap on the number of samples, for high sample rate audio it was suboptimal, calculate the low neighbour power of two for the number of samples (audio blocks) instead. - Make the function work correctly also for non-pcm codecs by using the stream bitrate to estimate the target packet size. A previous version of this patch used av_get_audio_frame_duration2() the estimate the desired packet size, but for some codecs that returns the duration of a single audio frame regardless of frame_bytes. - Fallback to 4096/block_align*block_align if bitrate is not available. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: correct bitstream checkGyan Doshi2024-03-161-1/+1
| | | | | | | | | | | 8559cce3c3 made the bitstream check generic using a LUT. However, one of the comparisons which involves a bitwise AND and equality check is faulty due to operator precedence. First reported and analysed at https://github.com/streamlink/streamlink/issues/5876 Fixes #10908
* avformat/dvdvideodec: use int64_t for menu blocks_read and make format ↵Marth642024-03-151-7/+8
| | | | | | | expressions portable Signed-off-by: Marth64 <marth64@proxyid.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Remove av_restrictAndreas Rheinhardt2024-03-153-6/+6
| | | | | | | | | All versions of MSVC that support C11 (namely >= v19.27) also support the restrict keyword, therefore av_restrict is no longer necessary since 75697836b1db3e0f0a3b7061be6be28d00c675a0. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Remove declaration for ff_format_io_close_default()Andreas Rheinhardt2024-03-141-4/+0
| | | | | | Forgotten in d6799ee0e41dee35ebf9c664173aed8e3ab24141. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avidec: Fix integer overflow iff ULONG_MAX < INT64_MAXAndreas Rheinhardt2024-03-141-1/+1
| | | | | | | | Affects many FATE-tests, see https://fate.ffmpeg.org/report.cgi?time=20240312011016&slot=ppc-linux-gcc-13.2-ubsan-altivec-qemu Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/daudenc: force 2000 sample packet size with a bsfMarton Balint2024-03-141-6/+5
| | | | | | | | The samples I found all have 2000 sample packets, and by forcing the packet size with a bsf we could automagically make muxing work for packets containing more than 3640 samples. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/gopher: Add audio and video itemtypesChristian Lee Seibold2024-03-121-0/+3
| | | | | | | | The 's', ';', and '<' itemtypes are used for audio and video by Gophernicus and Gopher+. Signed-off-by: Christian Lee Seibold <christian.seibold32@outlook.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/webvttdec: Skip more parts of header to let parsing continueKristoffer Brånemyr2024-03-121-0/+2
| | | | | Signed-off-by: Kristoffer Brånemyr <ztion1@yahoo.se> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/fifo_test: Move into tests/fifo_muxer.cAndreas Rheinhardt2024-03-125-160/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This muxer solely exists to test the fifo muxer via a dedicated test tool in libavformat/tests/fifo_muxer.c. It fulfills no other role and it is only designed with this role in mind. The latter can be seen in two facts: The muxer uses printf for logging and it simply presumes the packets' data to contain a FailingMuxerPacketData (a struct duplicated in fifo_test.c and tests/fifo_muxer.c.); in particular, it presumes packets to have data at all, but this need not be true with side-data only packets and a segfault can easily be triggered by e.g. encoding flac (our native encoder sends a side-data only packet with updated extradata at the end of encoding). This patch fixes this by moving the test muxer into the fifo test tool, making it inaccessible via the API (and actually removing it from libavformat.so and libavformat.a). While this muxer was accessible via e.g. av_guess_format(), it was not really usable for an API user as FailingMuxerPacketData was not public. Therefore this is not considered a breaking change. In order to continue to use the test muxer in the test tool, the ordinary fifo muxer had to be overridden: fifo_muxer.c includes lavf/fifo.c but with FIFO_TEST defined which makes it support the fifo_test muxer. This is possible because test tools are always linked statically to their respective library. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/sccdec: remove unused bprint.h includeMarth642024-03-121-1/+0
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avcodec/rcwtenc: canonize name and refresh documentationMarth642024-03-121-14/+7
| | | | | | | | | | | | The formal title of the muxer according to the specification is "RCWT (Raw Captions With Time)", so canonize this in the long name of the codec and docs. In the documentation section, point #2 was wrong: ccextractor extracts the Closed Captions data and stores normalized bits similarly to this muxer. Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/aea: add aea muxerasivery2024-03-124-1/+118
| | | | Signed-off-by: asivery <asivery@protonmail.com>
* avformat/dvdvideodec: add menu demuxing supportMarth642024-03-121-11/+303
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/dvdvideodec: add CLUT utilities and subtitle color supportMarth642024-03-124-1/+127
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* lavf/fifo: sort options by nameStefano Sabatini2024-03-121-14/+14
|
* lavf/fifo: fix typoStefano Sabatini2024-03-111-1/+1
|
* lavf/dvenc: improve error messagingStefano Sabatini2024-03-111-36/+80
| | | | | Provide useful information about the failure in the error message, do not let the user guess.
* avformat/concatdec: Check in and outpoints to be to produce a positive ↵Michael Niedermayer2024-03-101-0/+6
| | | | | | | | | | representable duration Fixes: signed integer overflow: -93000000 - 9223372036839000000 cannot be represented in type 'long' Fixes: 64546/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5110813828186112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dvdvideodec: assign mono channel layout explicitlyMarth642024-03-101-1/+3
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing ↵Marton Balint2024-03-081-0/+12
| | | | | | | | h264 Partially fixes ticket #10395. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/tests/movenc: Constify write functionsAndreas Rheinhardt2024-03-081-2/+2
| | | | | | Forgotten in 2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/matroskadec: add missing linebreaks in error messagesAnton Khirnov2024-03-071-3/+3
|
* libs: bump major version for all librariesJames Almer2024-03-072-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: Reorder AVFormatContext fieldsJames Almer2024-03-071-111/+111
| | | | | | Move related fields closer together. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: remove AVFormatContext.ts_idJames Almer2024-03-072-7/+1
| | | | | | It's been replaced by a demuxer exported private option. Signed-off-by: James Almer <jamrial@gmail.com>