summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* configure: Remove av_restrictAndreas Rheinhardt2024-03-15
| | | | | | | | | 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-14
| | | | | | Forgotten in d6799ee0e41dee35ebf9c664173aed8e3ab24141. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avidec: Fix integer overflow iff ULONG_MAX < INT64_MAXAndreas Rheinhardt2024-03-14
| | | | | | | | 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-14
| | | | | | | | 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-12
| | | | | | | | 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-12
| | | | | 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-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-12
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avcodec/rcwtenc: canonize name and refresh documentationMarth642024-03-12
| | | | | | | | | | | | 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-12
| | | | Signed-off-by: asivery <asivery@protonmail.com>
* avformat/dvdvideodec: add menu demuxing supportMarth642024-03-12
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/dvdvideodec: add CLUT utilities and subtitle color supportMarth642024-03-12
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* lavf/fifo: sort options by nameStefano Sabatini2024-03-12
|
* lavf/fifo: fix typoStefano Sabatini2024-03-11
|
* lavf/dvenc: improve error messagingStefano Sabatini2024-03-11
| | | | | 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-10
| | | | | | | | | | 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-10
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing ↵Marton Balint2024-03-08
| | | | | | | | h264 Partially fixes ticket #10395. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/tests/movenc: Constify write functionsAndreas Rheinhardt2024-03-08
| | | | | | Forgotten in 2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/matroskadec: add missing linebreaks in error messagesAnton Khirnov2024-03-07
|
* libs: bump major version for all librariesJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: Reorder AVFormatContext fieldsJames Almer2024-03-07
| | | | | | Move related fields closer together. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: remove AVFormatContext.ts_idJames Almer2024-03-07
| | | | | | It's been replaced by a demuxer exported private option. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: Use enum AVCodecID for raw_codec_idAndreas Rheinhardt2024-03-07
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avformat: Add FFInputFormat, hide internals of AVInputFormatAndreas Rheinhardt2024-03-07
| | | | | | | | | | | | | | | | | | | | | This commit does for AVInputFormat what commit 59c9dc82f450638a3068deeb1db5c56f6d155752 did for AVOutputFormat: It adds a new type FFInputFormat, moves all the internals of AVInputFormat to it and adds a now reduced AVInputFormat as first member. This does not affect/improve extensibility of both public or private fields for demuxers (it is still a mess due to lavd). This is possible since 50f34172e0cca2cabc5836308ec66dbf93f5f2a3 (which removed the last usage of an internal field of AVInputFormat in fftools). (Hint: tools/probetest.c accesses the internals of FFInputFormat as well, but given that it is a testing tool this is not considered a problem.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/version_major: postpone some deprecations until the next bumpJames Almer2024-03-07
| | | | | | They are either too recent, or are not trivial to remove. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_PKT_DURATIONJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUTJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_AVIO_WRITE_NONCONSTJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_AVFORMAT_IO_CLOSEJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_AVIODIRCONTEXTJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_GET_END_PTSJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method()Andreas Rheinhardt2024-03-06
| | | | | | Forgotten in b7785d10b00c88029d8af7dbddac09ab0d6f2b7f. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: fix setting dependent disposition on ambisonic IAMF streamsJames Almer2024-03-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: add a function to return the name of stream groupsJames Almer2024-03-05
| | | | | Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf_writer: constify some variablesJames Almer2024-03-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf_writer: clear extradata_size on extradata allocation failureJames Almer2024-03-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc, hlsenc: Return 0 on succes from write_headerAndreas Rheinhardt2024-03-05
| | | | | | | | | | | | | Do not propagate the return value of avformat_write_header(), as it contains the information whether the output had already been initialized in avformat_init_output(), but this is set generically; the return value of FFOutputFormat.write_header is not documented at all (and is currently ignored if >= 0), but it is more future-proof to simply return 0 on success. Reviewed-by: Liu Steven <lq@chinaffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hlsenc: Redo checking for strftime %s support to avoid warningsAndreas Rheinhardt2024-03-05
| | | | | | | | | This is intended to avoid -Wformat= warnings on systems where %s might not be supported (and also generally emitted by GCC with -pedantic). Reviewed-by: Liu Steven <lq@chinaffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avio: Avoid av_strdup(NULL)Andreas Rheinhardt2024-03-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avio: Avoid indirection in ffio_fdopen()Andreas Rheinhardt2024-03-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avio: Avoid function pointer castsAndreas Rheinhardt2024-03-05
| | | | | | | It is undefined behaviour to use a different type for a call than the actual type of the function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: Move code specific to URLContexts to avio.cAndreas Rheinhardt2024-03-05
| | | | | | | This separates the URL-layer adjacent parts of the code from the parts that are also usable with custom IO. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamfenc: ensure updated extradata is writtenJames Almer2024-03-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf_writer: update extradata from packet side dataJames Almer2024-03-04
| | | | | | | Some encoders, like flac, propagate updated extradata at the end of encoding as packet side data. Use it to update the relevant codec_config. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: set stream index field in tile gridsJames Almer2024-03-04
| | | | | | It was forgotten for grid type derived images. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: don't mark an item referenced by a grid as dependent if it's ↵James Almer2024-03-04
| | | | | | | | | the primary item If it's the primary item, then it's expected to be ready for presentation even outside of the grid it belongs to. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: fix setting disposition for the first iamf streamJames Almer2024-03-04
| | | | | | st->disposition will be overwritten with disposition later in the function. Signed-off-by: James Almer <jamrial@gmail.com>
* fix /// comments that should be ///<Andrew Sayers2024-03-04
| | | | | | Actual command: sed -i -e "s/\([;,] *\)<* *\/\/\/ *<* */\1\/\/\/< /" $( git grep -l "[;,] */// " ) Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
* avformat/dvdvideodec: fix -pgc and -pg optionsMarth642024-03-04
| | | | | | | | | | Rebased on top of recently merged fixes (should apply correctly now). In merged DVD patch, -pgc and -pg options were broken. While these are rather advanced options, they are the only means to get content for some strangely authored discs. Signed-off-by: Marth64 <marth64@proxyid.net>