Commit Graph

46 Commits

Author SHA1 Message Date
Pierre-Anthony Lemieux 906219e3ca
avformat/tests/imf: add CPL timecode test 2022-11-03 21:16:10 +10:00
Andreas Rheinhardt d27c5bce33 avformat/tests/imf: Test ff_imf_parse_cpl_from_xml_dom cleanup on error
Improves the test; also should fix Coverity issue #1512408.

Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-27 02:16:36 +02:00
Pierre-Anthony Lemieux 751549af9b
avformat/imf: refactor to use avutil/uuid 2022-06-12 18:34:37 +10:00
Andreas Rheinhardt 35ec5c819b avformat/demux: Add new demux.h header
And move those stuff already in demuxer-only files to it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:37:38 +02:00
James Almer e6e86a3907 avformat/test/seek: set ch_layout instead of channels
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
Pierre-Anthony Lemieux 8744b103da
avformat/tests: add test for ff_rescale_interval()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-03-19 21:34:04 +10: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
Pierre-Anthony Lemieux bec300f4e1
avformat/tests: add /imf to .gitignore
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-02-05 22:52:39 +10: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
Andreas Rheinhardt 20b0b2be6c avformat/tests/imf: Don't use uninitialized value
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 10:35:19 +01:00
Pierre-Anthony Lemieux 6b7e4de0db
avformat/imf: Tests
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-12-31 17:26:01 +10: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
Andreas Rheinhardt 2934a4b9a5 Remove unnecessary avassert.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:30 +02:00
Marton Balint fb4da90fec avformat/url: add ff_make_absolulte_url2 to be able to test windows path cases
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-07 22:14:56 +02:00
Andreas Rheinhardt edcbb3e1b9 avformat/tests/fifo_muxer: Fix memleak on error, fix API violation
The test program for the FIFO muxer allocates a buffer without padding
and wraps it into a packet via av_packet_from_data(). This is an API
violation. Furthermore, said buffer leaks in case av_packet_from_data()
fails. Fix both of these issues by using av_new_packet() instead.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 02:25:02 +01:00
Andreas Rheinhardt aff1d373b1 avformat/tests/fifo_muxer: Fix leak of AVPacket on error
Also factor allocating and freeing the packet out.
Fixes Coverity issues #1473722 and #1473723; it is a regression
since 4b386b2059.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 02:24:53 +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
James Almer 4b386b2059 avformat/tests/fifo_muxer: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
ruiquan.crq ae9a1a9698 lavf/url: fix relative url parsing when the query string or fragment has a colon
This disallows the usage of ? and # in libavformat specific scheme options
(e.g. subfile,,start,32815239,end,0,,:video.ts) but this change was considered
acceptable.

Signed-off-by: ruiquan.crq <caihaoning83@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-10-28 21:34:09 +01:00
Nicolas George 1201687da2 lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().
Also add and update some tests.

Change the semantic a little, because for filesytem paths
symlinks complicate things.
See the comments in the code for detail.

Fix trac tickets #8813 and 8814.
2020-08-12 16:45:21 +02:00
Nicolas George d853293679 lavf/url: add ff_url_decompose(). 2020-08-12 16:33:09 +02:00
Steven Liu 648051f07c avformat/url: check url root node when rel include double dot and trim double dot
fix ticket: 8625
and add testcase into url for double dot corner case

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-05-06 12:00:26 +08:00
Marton Balint 554576b6cf avformat/utils: make av_url_split search for hashmark as well to separate hostname
RFC 3986 states that the generic syntax uses the slash ("/"), question mark
("?"), and number sign ("#") characters to delimit components that are
significant to the generic parser's hierarchical interpretation of an
identifier.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Marton Balint 365b817b51 avformat/tests/url: add av_url_split tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Marton Balint 0f5127b1ca avformat/tests/url: make format more readable
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01: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
Josh de Kock 598d5f8579 lavf: move fifo test muxer into separate file
This fixes the fate-fifo-muxer test with the clarified
removal of registering external formats.
2018-02-06 18:57:31 +00:00
James Almer d6d605eb05 avformat/mux: stop delaying writing the header
Every bitstream filter behaves as intended now, so there's no need to
wait for the first packet of every stream.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-06 15:43:59 -03:00
Timo Rothenpieler de6a1e32fd movenc-test: fix potential uninitialized read
Fixes CID #1413023
2017-11-13 20:33:10 +01:00
James Almer ca2b779423 avformat: remove use of deprecated AVFMT_FLAG_KEEP_SIDE_DATA flag
It has no effect whatsoever since the major bump.
Replace the flag's documentation to reflect this as well.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 00:09:52 -03: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
James Almer 30518a68a7 Merge commit '537b5b773b317af79d3a5b576ee9683e15ed84f6'
* commit '537b5b773b317af79d3a5b576ee9683e15ed84f6':
  rtmpdh: Do global initialization before running the test

Merged-by: James Almer <jamrial@gmail.com>
2017-04-04 15:56:36 -03:00
wm4 55eab1733b ffmpeg, ffprobe: don't "merge" side data into packet data by default
Preparation for potentially disabling merged side data by default in the
libs. Do this in particular because it affects fate tests.

The changed tests either reflect added packet side data, or the changed
packet size due to merged side data removal reducing the packet size.
2017-03-14 23:37:28 +01:00
Steven Liu d1f3e475f9 avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
CID: 1396257

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-06 06:35:32 +08:00
Gregory J. Wolfe 9c041a3cd5 avformat/tests/fifo_muxer: includes libavformat/network.h to define ETIMEDOUT for fate build.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-01 23:42:50 +01:00
Martin Storsjö 537b5b773b rtmpdh: Do global initialization before running the test
The rtmpdh code can use crypto libraries which may require
a process global init. (gcrypt is one of the libraries
where the rtmpdh test code can fail if global init hasn't been
done, depending on gcrypt version.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-11-24 13:59:17 +02: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
Zhao Zhili 7853d838a6 avformat/tests/gitignore: add fifo_muxer entry
Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-18 03:38:37 +02:00
Jan Sebechlebsky b84c83144d avformat/fifo: Add fate test
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-08-22 22:07:48 +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