Skip to content

Commit

Permalink
Check if extradata exists before pushing it into tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mikrohard committed May 26, 2015
1 parent 8571eec commit f90651b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/h264-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

// Check if keyframe and the length of tags.
// This makes sure we write metadata on the first frame of a segment.
if (this._h264Frame.keyFrame || this.tags.length === 0) {
if (this._oldExtraData.extraDataExists() && (this._h264Frame.keyFrame || this.tags.length === 0)) {
// Push extra data on every IDR frame in case we did a stream change + seek
this.tags.push(this._oldExtraData.metaDataTag(this._h264Frame.pts));
this.tags.push(this._oldExtraData.extraDataTag(this._h264Frame.pts));
Expand Down

0 comments on commit f90651b

Please sign in to comment.