Skip to content

Commit

Permalink
fix: regenerate expected ts with packet stuffing
Browse files Browse the repository at this point in the history
  • Loading branch information
lee.fordyce committed Jan 25, 2024
1 parent 857a285 commit 0120de1
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packager/live_packager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -550,12 +550,14 @@ TEST_F(LivePackagerBaseTest, VerifyAes128WithDecryption) {
live_config.format = LiveConfig::OutputFormat::TS;
live_config.track_type = LiveConfig::TrackType::VIDEO;
live_config.protection_scheme = LiveConfig::EncryptionScheme::AES_128;
live_config.segment_number = i;

SetupLivePackagerConfig(live_config);
ASSERT_EQ(Status::OK, live_packager_->Package(init_seg, media_seg, out));
ASSERT_GT(out.SegmentSize(), 0);

std::string exp_segment_num = absl::StrFormat("expected/ts/%04d.ts", i + 1);
std::string exp_segment_num =
absl::StrFormat("expected/stuffing_ts/%04d.ts", i + 1);
std::vector<uint8_t> exp_segment_buffer = ReadTestDataFile(exp_segment_num);
ASSERT_FALSE(exp_segment_buffer.empty());

Expand All @@ -564,8 +566,7 @@ TEST_F(LivePackagerBaseTest, VerifyAes128WithDecryption) {
out.SegmentData() + out.SegmentSize());

ASSERT_TRUE(decryptor.Crypt(buffer, &decrypted));
// TODO(Fordyce): with null packet stuffing this is no longer valid
// ASSERT_EQ(decrypted, exp_segment_buffer);
ASSERT_EQ(decrypted, exp_segment_buffer);
}
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0120de1

Please sign in to comment.