From 038ec8b21afddfe6495626b8ab57d8635ab5a811 Mon Sep 17 00:00:00 2001 From: Tianxiao Wang Date: Mon, 15 Apr 2019 18:10:42 +0800 Subject: [PATCH] fix: cannot read property hdlr of undefined (#66) --- packages/griffith-mp4/src/mp4/mp4Box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/griffith-mp4/src/mp4/mp4Box.js b/packages/griffith-mp4/src/mp4/mp4Box.js index bafe9ad7..f2f2482f 100644 --- a/packages/griffith-mp4/src/mp4/mp4Box.js +++ b/packages/griffith-mp4/src/mp4/mp4Box.js @@ -59,7 +59,7 @@ export default class MP4Box { Box.readType(stream) Box.readBody(stream) - if (Box.type === 'trak') { + if (Box.type === 'trak' && Box.box.mdia) { const handlerType = Box.box.mdia.hdlr.handlerType if (handlerType === 'vide') { this.box.videoTrak = Box.box