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:
parent
3d10d019a5
commit
7db02dea5a
|
@ -71,14 +71,27 @@ foreach ( $ffmpeg_formats as $ffmpeg_format )
|
||||||
{
|
{
|
||||||
preg_match( '/^([^*]+)(\**)$/', $ffmpeg_format, $matches );
|
preg_match( '/^([^*]+)(\**)$/', $ffmpeg_format, $matches );
|
||||||
$video_formats[$matches[1]] = $matches[1];
|
$video_formats[$matches[1]] = $matches[1];
|
||||||
if ( $matches[2] == '**' )
|
if ( $matches[2] == '*' )
|
||||||
{
|
{
|
||||||
if ( !isset($video_format) )
|
$default_video_format = $matches[1];
|
||||||
|
}
|
||||||
|
elseif ( $matches[2] == '**' )
|
||||||
{
|
{
|
||||||
$video_format = $matches[1];
|
$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) )
|
if ( !empty($generate) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue