Bug 306 - Correctly parses format default char.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1909 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
12dec07d7f
commit
0d4474c6d9
|
@ -50,10 +50,10 @@ $video_formats = array();
|
||||||
$ffmpeg_formats = preg_split( '/\s+/', ZM_FFMPEG_FORMATS );
|
$ffmpeg_formats = preg_split( '/\s+/', ZM_FFMPEG_FORMATS );
|
||||||
foreach ( $ffmpeg_formats as $ffmpeg_format )
|
foreach ( $ffmpeg_formats as $ffmpeg_format )
|
||||||
{
|
{
|
||||||
if ( preg_match( '/^(.+)\*$/', $ffmpeg_format, $matches ) )
|
if ( preg_match( '/^([^*]+)(\*\*?)$/', $ffmpeg_format, $matches ) )
|
||||||
{
|
{
|
||||||
$video_formats[$matches[1]] = $matches[1];
|
$video_formats[$matches[1]] = $matches[1];
|
||||||
if ( !isset($video_format) )
|
if ( !isset($video_format) && $matches[2] == "*" )
|
||||||
{
|
{
|
||||||
$video_format = $matches[1];
|
$video_format = $matches[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue