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:
stan 2006-03-31 14:44:34 +00:00
parent 12dec07d7f
commit 0d4474c6d9
1 changed files with 2 additions and 2 deletions

View File

@ -50,10 +50,10 @@ $video_formats = array();
$ffmpeg_formats = preg_split( '/\s+/', ZM_FFMPEG_FORMATS );
foreach ( $ffmpeg_formats as $ffmpeg_format )
{
if ( preg_match( '/^(.+)\*$/', $ffmpeg_format, $matches ) )
if ( preg_match( '/^([^*]+)(\*\*?)$/', $ffmpeg_format, $matches ) )
{
$video_formats[$matches[1]] = $matches[1];
if ( !isset($video_format) )
if ( !isset($video_format) && $matches[2] == "*" )
{
$video_format = $matches[1];
}