From f01f03812a225775aede2ebcdab7786f2cc5fe0c Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:16:00 +0200 Subject: [PATCH] test: add pktsize to test_h264_packet_base() --- test/h264.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/h264.c b/test/h264.c index 9db0e0fef..ae8d7002f 100644 --- a/test/h264.c +++ b/test/h264.c @@ -698,10 +698,10 @@ static int packet_handler(bool marker, uint64_t rtp_ts, } -static int test_h264_packet_base(const char *bs, bool long_startcode) +static int test_h264_packet_base(const char *bs, bool long_startcode, + size_t max_pktsize) { struct state state; - const size_t MAX_PKTSIZE = 8; int err; memset(&state, 0, sizeof(state)); @@ -717,7 +717,7 @@ static int test_h264_packet_base(const char *bs, bool long_startcode) if (!state.mb) return ENOMEM; - err = h264_packetize(DUMMY_TS, state.buf, state.len, MAX_PKTSIZE, + err = h264_packetize(DUMMY_TS, state.buf, state.len, max_pktsize, packet_handler, &state); if (err) goto out; @@ -748,12 +748,13 @@ static const char *bitstream_long = int test_h264_packet(void) { + const size_t MAX_PKTSIZE = 8; int err; - err = test_h264_packet_base(bitstream, false); + err = test_h264_packet_base(bitstream, false, MAX_PKTSIZE); TEST_ERR(err); - err = test_h264_packet_base(bitstream_long, true); + err = test_h264_packet_base(bitstream_long, true, MAX_PKTSIZE); TEST_ERR(err); out: