[vlc-commits] test: packetizer: parametrize extradata check
Francois Cartegnie
git at videolan.org
Fri Sep 27 19:43:38 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 27 11:29:48 2019 +0200| [b85a73b9741477db9b57026507fb176519e0bf01] | committer: Francois Cartegnie
test: packetizer: parametrize extradata check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b85a73b9741477db9b57026507fb176519e0bf01
---
test/modules/packetizer/h264.c | 1 +
test/modules/packetizer/hevc.c | 1 +
test/modules/packetizer/packetizer.h | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/modules/packetizer/h264.c b/test/modules/packetizer/h264.c
index 4c6ac33f98..b52ab3b4fb 100644
--- a/test/modules/packetizer/h264.c
+++ b/test/modules/packetizer/h264.c
@@ -111,6 +111,7 @@ int main(void)
params.i_rate_num = 0;
params.i_rate_den = 0;
params.i_frame_count = 2*25;
+ params.b_extra = true;
params.i_read_size = 500;
RUN("block 500", test_packetize,
diff --git a/test/modules/packetizer/hevc.c b/test/modules/packetizer/hevc.c
index cb225ad91d..d049513754 100644
--- a/test/modules/packetizer/hevc.c
+++ b/test/modules/packetizer/hevc.c
@@ -129,6 +129,7 @@ int main(void)
params.i_rate_num = 0;
params.i_rate_den = 0;
params.i_frame_count = 2*25;
+ params.b_extra = true;
params.i_read_size = 500;
RUN("block 500", test_packetize,
diff --git a/test/modules/packetizer/packetizer.h b/test/modules/packetizer/packetizer.h
index 481344bded..2220898d44 100644
--- a/test/modules/packetizer/packetizer.h
+++ b/test/modules/packetizer/packetizer.h
@@ -39,6 +39,7 @@ struct params_s
unsigned i_rate_den;
unsigned i_read_size;
unsigned i_frame_count;
+ bool b_extra;
};
#define BAILOUT(run) { fprintf(stderr, "failed %s line %d\n", run, __LINE__); \
@@ -139,7 +140,7 @@ static int test_packetize(const char *run,
EXPECT(p_block != NULL);
}
- EXPECT(p->fmt_out.i_extra);
+ EXPECT(!!params->b_extra == !!p->fmt_out.i_extra);
delete_packetizer(p);
More information about the vlc-commits
mailing list