Use ChiakiKeyState to 32bit fix key state overflow (Fix #172) (#359)

This commit is contained in:
Sven Scharmentke 2020-11-04 11:45:05 +01:00 committed by GitHub
commit 59e6603256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 272 additions and 108 deletions

View file

@ -28,9 +28,12 @@ static MunitResult test_av_packet_parse(const MunitParameter params[], void *use
0x57, 0x5a, 0x76, 0x0, 0xc5, 0xe0, 0x93, 0xa9, 0xf5, 0x32, 0x5d, 0xee, 0xf7, 0x9d
};
ChiakiKeyState key_state;
chiaki_key_state_init(&key_state);
ChiakiTakionAVPacket av_packet;
ChiakiErrorCode err = chiaki_takion_v9_av_packet_parse(&av_packet, packet, sizeof(packet));
ChiakiErrorCode err = chiaki_takion_v9_av_packet_parse(&av_packet, &key_state, packet, sizeof(packet));
munit_assert_int(err, ==, CHIAKI_ERR_SUCCESS);
munit_assert(av_packet.is_video);