9b6a1da5 by Jernej Fijačko Committed by David LaPalomento

Check if extradata exists before pushing it into tags

1 parent 63c045e6
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
80 80
81 // Check if keyframe and the length of tags. 81 // Check if keyframe and the length of tags.
82 // This makes sure we write metadata on the first frame of a segment. 82 // This makes sure we write metadata on the first frame of a segment.
83 if (this._h264Frame.keyFrame || this.tags.length === 0) { 83 if (this._oldExtraData.extraDataExists() && (this._h264Frame.keyFrame || this.tags.length === 0)) {
84 // Push extra data on every IDR frame in case we did a stream change + seek 84 // Push extra data on every IDR frame in case we did a stream change + seek
85 this.tags.push(this._oldExtraData.metaDataTag(this._h264Frame.pts)); 85 this.tags.push(this._oldExtraData.metaDataTag(this._h264Frame.pts));
86 this.tags.push(this._oldExtraData.extraDataTag(this._h264Frame.pts)); 86 this.tags.push(this._oldExtraData.extraDataTag(this._h264Frame.pts));
......