Skip to content

Commit ed830d1

Browse files
committed
isobmff: fix DREF unittest
Tested: ``` $ make test Running tests... /usr/local/lib64/python3.13/site-packages/cmake/data/bin/ctest Test project isobmff/build Start 1: DREF_unittest 1/8 Test #1: DREF_unittest .................... Passed 0.00 sec Start 2: FTYP_unittest 2/8 Test #2: FTYP_unittest .................... Passed 0.00 sec Start 3: HDLR_unittest 3/8 Test #3: HDLR_unittest .................... Passed 0.00 sec Start 4: MDHD_unittest 4/8 Test #4: MDHD_unittest .................... Passed 0.00 sec Start 5: META_unittest 5/8 Test #5: META_unittest .................... Passed 0.00 sec Start 6: MVHD_unittest 6/8 Test #6: MVHD_unittest .................... Passed 0.00 sec Start 7: Parser_unittest 7/8 Test #7: Parser_unittest .................. Passed 0.00 sec Start 8: TKHD_unittest 8/8 Test #8: TKHD_unittest .................... Passed 0.00 sec 100% tests passed, 0 tests failed out of 8 Total Test time (real) = 0.03 sec ```
1 parent 77e56c9 commit ed830d1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/DREF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace ISOBMFF
8787

8888
FullBox::ReadData(parser, stream);
8989

90-
stream.Seek(8); // Move to the position after the 'dref' header
90+
// auto entry_count =
9191
stream.ReadBigEndianUInt32();
9292
container.ReadData(parser, stream);
9393

test/DREF_unittest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class ISOBMFFDREFTest : public ::testing::Test {
2222
const std::vector<uint8_t> &buffer = {
2323
// following example input is from a sample .mp4 video file
2424
// dref size: 28 bytes
25-
0x00, 0x00, 0x00, 0x1c,
25+
// 0x00, 0x00, 0x00, 0x1c,
2626
// dref
27-
0x64, 0x72, 0x65, 0x66,
27+
// 0x64, 0x72, 0x65, 0x66,
2828
// dref content:
2929
0x00, 0x00, 0x00, 0x00,
3030
0x00, 0x00, 0x00, 0x01,
@@ -52,7 +52,7 @@ class ISOBMFFDREFTest : public ::testing::Test {
5252
ASSERT_NE(dref, nullptr) << "Failed to cast to DREF";
5353

5454
EXPECT_EQ(dref->GetVersion(), 0) << "Unexpected DREF version";
55-
EXPECT_EQ(dref->GetFlags(), 28) << "Unexpected DREF flags";
55+
EXPECT_EQ(dref->GetFlags(), 0) << "Unexpected DREF flags";
5656

5757
// Validate sub-boxes inside DREF
5858
std::vector<std::shared_ptr<Box>> boxes = dref->GetBoxes();

0 commit comments

Comments
 (0)