Commit Graph

20 Commits

Author SHA1 Message Date
Martin Storsjö e4f5c2414b tests/movenc: Validate that normal muxer usage doesn't print warnings
We have test to make sure that certain configurations do print
warnings. However, the normal operation of the muxer within this
test always printed a warning, so those tests to check for
extra warnings didn't essentially guard anything.

The warning that always was printed, "track 1: codec frame size is
not set" was not present in the libav fork where this testcase
originated, it was removed in f234e8a32e.

Set the frame size for the audio stream to silence the warning,
and use this frame size in a couple later calculations, and check
that one test configuration doesn't print warnings.

Setting the frame size apparently changes the rounding of a timestamp
in the ismv muxing testcase.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-11 14:08:55 +03:00
Martin Storsjö fbd5e238d4 movenc: Allow writing timed ID3 metadata
This is based on a spec at https://aomediacodec.github.io/id3-emsg/,
further based on ISO/IEC 23009-1:2019.

Within libavformat, timed ID3 metadata (already supported by the
mpegts demuxer and muxer) is handled as a separate data AVStream
with codec type AV_CODEC_ID_TIMED_ID3. However, it doesn't
have a corresponding track in the mov file - instead, these events
are written as separate toplevel 'emsg' boxes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-10 10:48:50 +03:00
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt 93178c6c1a avformat/tests/movenc: Constify write functions
Forgotten in 2a68d945cd.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 03:30:57 +01:00
Marton Balint ace9459c41 tests: do not override movflags defaults
It does not matter if the default is 0, but still it is cleaner that way.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-04-24 23:00:50 +02:00
Vittorio Giovara c26a7507aa movenc-test: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:34 -03:00
Andreas Rheinhardt f6d14b1297 avformat/avformat: Add AVFMT_AVOID_NEG_TS_DISABLED
And also don't use explicit constants in the movenc test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-21 16:47:38 +01:00
Marvin Scholz c6f4e10111 avformat: do not use AVIO_FLAG_* with avio_alloc_context
The documentation states that here 0 should be used for read-only and
1 for a writable buffer. AVIO_FLAG_WRITE however is 2, while it works
due to the way the flag is handled internally, it is still wrong
according to the documentation.

Additionally it makes it seem as if the AVIO_FLAG_* values could be used
here, which is actually not true, as when AVIO_FLAG_READ would be used
here it would create a writable buffer as AVIO_FLAG_READ is defined as 1.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2021-12-04 14:06:30 +01:00
James Almer d365f74dce avformat/tests/movenc: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
Josh de Kock 89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
Timo Rothenpieler de6a1e32fd movenc-test: fix potential uninitialized read
Fixes CID #1413023
2017-11-13 20:33:10 +01:00
Martin Storsjö 5455a44aa5 movenc-test: Add tests for negative cts offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-28 18:15:45 +02:00
Anton Khirnov 78a7af823b Use the new AVIOContext destructor.
(cherry picked from commit 6f554521af)
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-01 02:16:33 -03:00
Derek Buitenhuis dfe7e5501d FATE: Add test for muxing discontinuous MP4 fragments with large timestamps
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-10-19 13:25:21 +02:00
Matthieu Bouron c60d328e67 Merge commit 'a79aafd0b4d37eda6f15dc68e6509d4e815290c9'
* commit 'a79aafd0b4d37eda6f15dc68e6509d4e815290c9':
  movenc: Add a test for VFR with b-frames, with a duration change at a fragment end

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 22:20:10 +02:00
Matthieu Bouron d671652f6e Merge commit 'fd4957d9c67996e7d218fd36b4168c9cb85f9ea7'
* commit 'fd4957d9c67996e7d218fd36b4168c9cb85f9ea7':
  movenc-test: Test write_data_type

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 18:03:49 +02:00
Clément Bœsch 5d48e4eafa Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'
* commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196':
  tests: Move all test programs to a subdirectory

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-22 13:44:34 +02:00
Martin Storsjö a79aafd0b4 movenc: Add a test for VFR with b-frames, with a duration change at a fragment end
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:05 +03:00
Martin Storsjö fd4957d9c6 movenc-test: Test write_data_type
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:00 +03:00
Diego Biurrun a6a750c7ef tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00