Check if extradata exists before pushing it into tags
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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)); | ... | ... |
-
Please register or sign in to post a comment