Fix width / height detection
This commit is contained in:
parent
554cec2bc7
commit
c4fcee4517
2 changed files with 10 additions and 2 deletions
|
|
@ -83,6 +83,12 @@ class StreamTest extends TestCase
|
|||
$this->assertEquals(new Dimension(1280, 720), $stream->getDimensions());
|
||||
}
|
||||
|
||||
public function testGetDimensionsFromVideoWith11SampleRatio()
|
||||
{
|
||||
$stream = new Stream(array('codec_type' => 'video', 'width' => 1920, 'height' => 1080, 'sample_aspect_ratio' => '1:1', 'display_aspect_ratio' => '16:9'));
|
||||
$this->assertEquals(new Dimension(1920, 1080), $stream->getDimensions());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideInvalidRatios
|
||||
*/
|
||||
|
|
@ -91,7 +97,7 @@ class StreamTest extends TestCase
|
|||
$stream = new Stream(array('codec_type' => 'video', 'width' => 960, 'height' => 720, 'sample_aspect_ratio' => $invalidRatio, 'display_aspect_ratio' => '16:9'));
|
||||
$this->assertEquals(new Dimension(960, 720), $stream->getDimensions());
|
||||
}
|
||||
|
||||
|
||||
public function provideInvalidRatios()
|
||||
{
|
||||
return array(array('0:1'), array('2:1:3'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue