Bug 207 - Fall back in xHTML to default video format if phone format no specified

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1619 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-11-22 15:12:59 +00:00
parent 3d10d019a5
commit 7db02dea5a
1 changed files with 18 additions and 5 deletions

View File

@ -71,13 +71,26 @@ foreach ( $ffmpeg_formats as $ffmpeg_format )
{
preg_match( '/^([^*]+)(\**)$/', $ffmpeg_format, $matches );
$video_formats[$matches[1]] = $matches[1];
if ( $matches[2] == '**' )
if ( $matches[2] == '*' )
{
if ( !isset($video_format) )
{
$video_format = $matches[1];
}
$default_video_format = $matches[1];
}
elseif ( $matches[2] == '**' )
{
$default_phone_format = $matches[1];
}
}
if ( isset($default_phone_format) )
{
$video_format = $default_phone_format;
}
elseif ( isset($default_video_format) )
{
$video_format = $default_video_format;
}
else
{
$video_format = $ffmpeg_formats[0];
}
if ( !empty($generate) )