1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
FFmpeg/libavformat/tests
Andreas Rheinhardt 41ab25cb2d avformat/fifo_test: Move into tests/fifo_muxer.c
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>
2024-03-12 22:39:54 +01:00
..
.gitignore avformat/tests: add test for ff_rescale_interval() 2022-03-19 21:34:04 +10:00
fifo_muxer.c avformat/fifo_test: Move into tests/fifo_muxer.c 2024-03-12 22:39:54 +01:00
imf.c avformat/imf: clean-up logging 2023-05-31 09:03:58 -07:00
movenc.c avformat/tests/movenc: Constify write functions 2024-03-08 03:30:57 +01:00
noproxy.c
rtmpdh.c
seek_utils.c avformat/demux: Add new demux.h header 2022-05-10 07:37:38 +02:00
seek.c avformat/test/seek: set ch_layout instead of channels 2022-03-22 08:45:38 -03:00
srtp.c
url.c