Skip to content

Commit cf06d9c

Browse files
committed
added $data['dimensions']['aspect_ratio_fix_warning'] so that if the aspect ratio has automatically converted the width and height we know about it
1 parent 3b1ca86 commit cf06d9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PHPVideoToolkit/MediaParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ public function getFileVideoComponent($file_path, $read_from_cache=true)
271271
'dimensions' => array(
272272
'width' => null,
273273
'height' => null,
274+
'aspect_ratio_fix_warning'=> false,
274275
),
275276
'bitrate' => null,
276277
'time_bases' => array(),
@@ -328,12 +329,11 @@ public function getFileVideoComponent($file_path, $read_from_cache=true)
328329
{
329330
$dimensions[1] = $dimensions_matches[2];
330331
$dimensions[2] = $dimensions_matches[1];
332+
$data['dimensions']['aspect_ratio_fix_warning'] = true;
331333
}
332334
}
333-
$data['dimensions'] = array(
334-
'width' => (float) $dimensions[1],
335-
'height' => (float) $dimensions[2],
336-
);
335+
$data['dimensions']['width'] = (float) $dimensions[1];
336+
$data['dimensions']['height'] = (float) $dimensions[2];
337337
}
338338
$dimension_match = $dimensions_matches[0];
339339
array_push($other_parts, $dimension_match);

0 commit comments

Comments
 (0)