52f3b9b3 by Gary Katsevman

Fixup h264stream test.

This should be updated with stubbed methods when it gets re-written so
that we can actually stub methods.
1 parent ce689aec
...@@ -70,6 +70,9 @@ test('starting PTS values can be negative', function() { ...@@ -70,6 +70,9 @@ test('starting PTS values can be negative', function() {
70 nalUnitTypes.access_unit_delimiter_rbsp 70 nalUnitTypes.access_unit_delimiter_rbsp
71 ]); 71 ]);
72 72
73 // add a "tag" to the stream so that it doesn't try and parse metadata
74 h264Stream.tags.push('spacer tag');
75
73 h264Stream.setTimeStampOffset(-100); 76 h264Stream.setTimeStampOffset(-100);
74 h264Stream.setNextTimeStamp(-100, -100, true); 77 h264Stream.setNextTimeStamp(-100, -100, true);
75 h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength); 78 h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength);
...@@ -80,6 +83,8 @@ test('starting PTS values can be negative', function() { ...@@ -80,6 +83,8 @@ test('starting PTS values can be negative', function() {
80 // flush out the last tag 83 // flush out the last tag
81 h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength); 84 h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength);
82 85
86 h264Stream.tags.shift();
87
83 strictEqual(h264Stream.tags.length, 3, 'three tags are ready'); 88 strictEqual(h264Stream.tags.length, 3, 'three tags are ready');
84 strictEqual(h264Stream.tags[0].pts, 0, 'the first PTS is zero'); 89 strictEqual(h264Stream.tags[0].pts, 0, 'the first PTS is zero');
85 strictEqual(h264Stream.tags[0].dts, 0, 'the first DTS is zero'); 90 strictEqual(h264Stream.tags[0].dts, 0, 'the first DTS is zero');
......