fix to m3u8
This commit is contained in:
parent
a105f49742
commit
ece8847b9c
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue