mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 22:43:19 +00:00
Fix #1023 : Some subdef options are not saved correctly (audio samplerate, GOP)
This commit is contained in:
@@ -304,7 +304,19 @@ class databox_subdef
|
|||||||
*/
|
*/
|
||||||
protected function buildAudioSubdef(SimpleXMLElement $sd)
|
protected function buildAudioSubdef(SimpleXMLElement $sd)
|
||||||
{
|
{
|
||||||
return new Audio();
|
$audio = new Audio();
|
||||||
|
|
||||||
|
if ($sd->acodec) {
|
||||||
|
$audio->setOptionValue(Audio::OPTION_ACODEC, (string) $sd->acodec);
|
||||||
|
}
|
||||||
|
if ($sd->bitrate) {
|
||||||
|
$audio->setOptionValue(Audio::OPTION_BITRATE, (int) $sd->bitrate);
|
||||||
|
}
|
||||||
|
if ($sd->audiosamplerate) {
|
||||||
|
$audio->setOptionValue(Audio::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -363,6 +375,12 @@ class databox_subdef
|
|||||||
if ($sd->bitrate) {
|
if ($sd->bitrate) {
|
||||||
$video->setOptionValue(Video::OPTION_BITRATE, (int) $sd->bitrate);
|
$video->setOptionValue(Video::OPTION_BITRATE, (int) $sd->bitrate);
|
||||||
}
|
}
|
||||||
|
if ($sd->audiosamplerate) {
|
||||||
|
$video->setOptionValue(Video::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate);
|
||||||
|
}
|
||||||
|
if ($sd->GOPsize) {
|
||||||
|
$video->setOptionValue(Video::OPTION_GOPSIZE, (int) $sd->GOPsize);
|
||||||
|
}
|
||||||
|
|
||||||
return $video;
|
return $video;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user