diff --git a/timestamp-id3.php b/timestamp-id3.php index 359bd2e..f6e041b 100644 --- a/timestamp-id3.php +++ b/timestamp-id3.php @@ -137,6 +137,11 @@ foreach ( $lines as $line ) { if ( preg_match( '/^#EXTINF:\s*(\d+(?:\.\d+)?),/', $line, $matches ) ) { $duration = floatval( $matches[1] ); } + if ( preg_match( '/^#EXT-X-VERSION:(.*)/', $line, $matches ) ) { + if ( intval( $matches[1] ) < 4 ) { + $line = "#EXT-X-VERSION:7"; + } + } if (preg_match( '/^#/', $line ) ) { $lines_out[] = $line; continue;