summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/encode_api_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/test/encode_api_test.cc')
-rw-r--r--third_party/aom/test/encode_api_test.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/third_party/aom/test/encode_api_test.cc b/third_party/aom/test/encode_api_test.cc
index c469d0871..c26f5720f 100644
--- a/third_party/aom/test/encode_api_test.cc
+++ b/third_party/aom/test/encode_api_test.cc
@@ -22,7 +22,7 @@ namespace {
TEST(EncodeAPI, InvalidParams) {
static const aom_codec_iface_t *kCodecs[] = {
#if CONFIG_AV1_ENCODER
- &aom_codec_av1_cx_algo,
+ aom_codec_av1_cx(),
#endif
};
uint8_t buf[1] = { 0 };
@@ -54,6 +54,16 @@ TEST(EncodeAPI, InvalidParams) {
EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_config_default(kCodecs[i], &cfg, 0));
EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, kCodecs[i], &cfg, 0));
+
+ EXPECT_EQ(NULL, aom_codec_get_global_headers(NULL));
+
+ aom_fixed_buf_t *glob_headers = aom_codec_get_global_headers(&enc);
+ EXPECT_TRUE(glob_headers->buf != NULL);
+ if (glob_headers) {
+ free(glob_headers->buf);
+ free(glob_headers);
+ }
+
EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));