From 143af3325ee40e77c5d041d3f674c8bdd4762dc7 Mon Sep 17 00:00:00 2001 From: James Heinrich Date: Tue, 26 Mar 2024 08:26:30 -0400 Subject: [PATCH] #440 Mpeg duration error due to error in GOP parsing https://github.com/JamesHeinrich/getID3/issues/440 --- getid3/getid3.php | 2 +- getid3/module.audio-video.mpeg.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/getid3/getid3.php b/getid3/getid3.php index 6adda752..e4d708b0 100644 --- a/getid3/getid3.php +++ b/getid3/getid3.php @@ -387,7 +387,7 @@ class getID3 */ protected $startup_warning = ''; - const VERSION = '1.9.23-202403230855'; + const VERSION = '1.9.23-202403260825'; const FREAD_BUFFER_SIZE = 32768; const ATTACHMENTS_NONE = false; diff --git a/getid3/module.audio-video.mpeg.php b/getid3/module.audio-video.mpeg.php index 876387b4..d45b9839 100644 --- a/getid3/module.audio-video.mpeg.php +++ b/getid3/module.audio-video.mpeg.php @@ -292,6 +292,10 @@ public function Analyze() { $GOPheader['time_code'] = sprintf('%02d'.$time_code_separator.'%02d'.$time_code_separator.'%02d'.$time_code_separator.'%02d', $GOPheader['time_code_hours'], $GOPheader['time_code_minutes'], $GOPheader['time_code_seconds'], $GOPheader['time_code_pictures']); $info['mpeg']['group_of_pictures'][] = $GOPheader; + } else { + // https://github.com/JamesHeinrich/getID3/issues/440 + $this->warning('group_of_pictures['.$GOPcounter.'] no valid bitratemode'); + $info['mpeg']['group_of_pictures'][] = array(); } break;