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() {
nalUnitTypes.access_unit_delimiter_rbsp
]);
// add a "tag" to the stream so that it doesn't try and parse metadata
h264Stream.tags.push('spacer tag');
h264Stream.setTimeStampOffset(-100);
h264Stream.setNextTimeStamp(-100, -100, true);
h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength);
......@@ -80,6 +83,8 @@ test('starting PTS values can be negative', function() {
// flush out the last tag
h264Stream.writeBytes(accessUnitDelimiter, 0, accessUnitDelimiter.byteLength);
h264Stream.tags.shift();
strictEqual(h264Stream.tags.length, 3, 'three tags are ready');
strictEqual(h264Stream.tags[0].pts, 0, 'the first PTS is zero');
strictEqual(h264Stream.tags[0].dts, 0, 'the first DTS is zero');
......