Index: trunk/extensions/OggHandler/OggHandler_body.php |
— | — | @@ -107,8 +107,15 @@ |
108 | 108 | } |
109 | 109 | foreach ( $metadata['streams'] as $stream ) { |
110 | 110 | if ( in_array( $stream['type'], $wgOggVideoTypes ) ) { |
| 111 | + $pictureWidth = $stream['header']['PICW']; |
| 112 | + $parNumerator = $stream['header']['PARN']; |
| 113 | + $parDenominator = $stream['header']['PARD']; |
| 114 | + if( $parNumerator && $parDenominator ) { |
| 115 | + // Compensate for non-square pixel aspect ratios |
| 116 | + $pictureWidth = $pictureWidth * $parNumerator / $parDenominator; |
| 117 | + } |
111 | 118 | return array( |
112 | | - $stream['header']['PICW'], |
| 119 | + $pictureWidth, |
113 | 120 | $stream['header']['PICH'] |
114 | 121 | ); |
115 | 122 | } |