diff options
author | Clément Bœsch <clement@stupeflix.com> | 2016-06-22 13:44:29 +0200 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2016-06-22 13:44:34 +0200 |
commit | 5d48e4eafa6c4559683892b8638d10508125f3cf (patch) | |
tree | 0d5becbd08d6ae319497dd32cbe9b67f4670cc5e /libavformat | |
parent | 989a614b707dcff8abdffe28dc24ec64a83b2837 (diff) | |
parent | a6a750c7ef240b72ce01e9653343a0ddf247d196 (diff) |
Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'
* commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196':
tests: Move all test programs to a subdirectory
Merged-by: Clément Bœsch <clement@stupeflix.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 21 | ||||
-rw-r--r-- | libavformat/tests/.gitignore | 6 | ||||
-rw-r--r-- | libavformat/tests/movenc.c (renamed from libavformat/movenc-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/noproxy.c (renamed from libavformat/noproxy-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/rtmpdh.c (renamed from libavformat/rtmpdh-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/seek.c (renamed from libavformat/seek-test.c) | 1 | ||||
-rw-r--r-- | libavformat/tests/srtp.c (renamed from libavformat/srtp-test.c) | 4 | ||||
-rw-r--r-- | libavformat/tests/url.c (renamed from libavformat/url-test.c) | 2 |
8 files changed, 22 insertions, 18 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index ddac2d3df5..6252de88be 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1559,23 +1559,20 @@ static int mkv_write_header(AVFormatContext *s) if ((tag = av_dict_get(s->metadata, "title", NULL, 0))) put_ebml_string(pb, MATROSKA_ID_TITLE, tag->value); if (!(s->flags & AVFMT_FLAG_BITEXACT)) { + uint32_t segment_uid[4]; + AVLFG lfg; + + av_lfg_init(&lfg, av_get_random_seed()); + + for (i = 0; i < 4; i++) + segment_uid[i] = av_lfg_get(&lfg); + put_ebml_string(pb, MATROSKA_ID_MUXINGAPP, LIBAVFORMAT_IDENT); if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0))) put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value); else put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT); - - if (mkv->mode != MODE_WEBM) { - uint32_t segment_uid[4]; - AVLFG lfg; - - av_lfg_init(&lfg, av_get_random_seed()); - - for (i = 0; i < 4; i++) - segment_uid[i] = av_lfg_get(&lfg); - - put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16); - } + put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16); } else { const char *ident = "Lavf"; put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , ident); diff --git a/libavformat/tests/.gitignore b/libavformat/tests/.gitignore new file mode 100644 index 0000000000..c8adb86892 --- /dev/null +++ b/libavformat/tests/.gitignore @@ -0,0 +1,6 @@ +/movenc +/noproxy +/rtmpdh +/seek +/srtp +/url diff --git a/libavformat/movenc-test.c b/libavformat/tests/movenc.c index 6c7f0f6ab2..786f1dc24a 100644 --- a/libavformat/movenc-test.c +++ b/libavformat/tests/movenc.c @@ -24,7 +24,7 @@ #include "libavutil/mathematics.h" #include "libavutil/md5.h" -#include "avformat.h" +#include "libavformat/avformat.h" #if HAVE_UNISTD_H #include <unistd.h> diff --git a/libavformat/noproxy-test.c b/libavformat/tests/noproxy.c index 4524764cbf..782356c6cd 100644 --- a/libavformat/noproxy-test.c +++ b/libavformat/tests/noproxy.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "network.h" +#include "libavformat/network.h" static void test(const char *pattern, const char *host) { diff --git a/libavformat/rtmpdh-test.c b/libavformat/tests/rtmpdh.c index e86fb18f97..929b3f3ff2 100644 --- a/libavformat/rtmpdh-test.c +++ b/libavformat/tests/rtmpdh.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rtmpdh.c" +#include "libavformat/rtmpdh.c" #include <stdio.h> diff --git a/libavformat/seek-test.c b/libavformat/tests/seek.c index 904b435aaa..7ed56ba4ef 100644 --- a/libavformat/seek-test.c +++ b/libavformat/tests/seek.c @@ -26,6 +26,7 @@ #include "libavutil/common.h" #include "libavutil/mathematics.h" + #include "libavformat/avformat.h" static char buffer[20]; diff --git a/libavformat/srtp-test.c b/libavformat/tests/srtp.c index 1198f592bc..89450cee8e 100644 --- a/libavformat/srtp-test.c +++ b/libavformat/tests/srtp.c @@ -20,8 +20,8 @@ #include <stdio.h> #include <string.h> -#include "rtpdec.h" -#include "srtp.h" +#include "libavformat/rtpdec.h" +#include "libavformat/srtp.h" static const char *aes128_80_key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn"; diff --git a/libavformat/url-test.c b/libavformat/tests/url.c index a1da82e493..1623179128 100644 --- a/libavformat/url-test.c +++ b/libavformat/tests/url.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "url.h" +#include "libavformat/url.h" static void test(const char *base, const char *rel) { |