Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Don't add metadata at random access indicators #290

Merged
merged 1 commit into from
May 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/h264-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@

this._state = 0; // :uint;

this._nextFrameKeyFrame = false;

this.tags = [];

};

//(pts:uint):void
H264Stream.prototype.setTimeStampOffset = function(pts) {
this._pts_offset = pts;
Expand Down Expand Up @@ -97,11 +95,6 @@
this._state = 0;
};


H264Stream.prototype.setNextFrameKeyFrame = function() {
this._nextFrameKeyFrame = true;
};

// (data:ByteArray, o:int, l:int):void
H264Stream.prototype.writeBytes = function(data, offset, length) {
var
Expand Down Expand Up @@ -263,11 +256,6 @@
this._h264Frame = new FlvTag(FlvTag.VIDEO_TAG);
this._h264Frame.pts = this._next_pts;
this._h264Frame.dts = this._next_dts;

if (this._nextFrameKeyFrame) {
this._h264Frame.keyFrame = true;
this._nextFrameKeyFrame = false;
}
}

this._h264Frame.startNalUnit();
Expand Down
17 changes: 1 addition & 16 deletions src/segment-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@
// adaptation_field_control, whether this header is followed by an
// adaptation field, a payload, or both
afflag = (data[offset + 3] & 0x30 ) >>> 4,
adaptationFieldLength,
afftemp,
randomAccessIndicator,

patTableId, // :int
patCurrentNextIndicator, // Boolean
Expand Down Expand Up @@ -253,19 +250,7 @@
// used to specify some forms of timing and control data that we
// do not currently use.
if (afflag > 0x01) {
adaptationFieldLength = data[offset];

if (adaptationFieldLength > 0) {
afftemp = data[offset + 1];

randomAccessIndicator = (afftemp & 0x40) >>> 6;

if (randomAccessIndicator === 1) {
h264Stream.setNextFrameKeyFrame();
}
}

offset += adaptationFieldLength + 1;
offset += data[offset] + 1;
}

// Handle a Program Association Table (PAT). PATs map PIDs to
Expand Down