}
}
- std::string config_delay;
- int config_delay_int = 0;
- if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0)
- config_delay_int = atoi(config_delay.c_str());
- m_decoder->setAC3Delay(ac3_delay == -1 ? config_delay_int : ac3_delay + config_delay_int);
-
- if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0)
- config_delay_int = atoi(config_delay.c_str());
- else
- config_delay_int = 0;
- m_decoder->setPCMDelay(pcm_delay == -1 ? config_delay_int : pcm_delay + config_delay_int);
+ setAC3Delay(ac3_delay == -1 ? 0 : ac3_delay);
+ setPCMDelay(pcm_delay == -1 ? 0 : pcm_delay);
m_decoder->setVideoPID(vpid, vpidtype);
selectAudioStream();
{
if (m_dvb_service)
m_dvb_service->setCacheEntry(eDVBService::cAC3DELAY, delay ? delay : -1);
- if (m_decoder)
- m_decoder->setAC3Delay(delay);
+ if (m_decoder) {
+ std::string config_delay;
+ int config_delay_int = 0;
+ if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0)
+ config_delay_int = atoi(config_delay.c_str());
+ m_decoder->setAC3Delay(delay + config_delay_int);
+ }
}
void eDVBServicePlay::setPCMDelay(int delay)
{
if (m_dvb_service)
m_dvb_service->setCacheEntry(eDVBService::cPCMDELAY, delay ? delay : -1);
- if (m_decoder)
- m_decoder->setPCMDelay(delay);
+ if (m_decoder) {
+ std::string config_delay;
+ int config_delay_int = 0;
+ if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0)
+ config_delay_int = atoi(config_delay.c_str());
+ else
+ config_delay_int = 0;
+ m_decoder->setPCMDelay(delay + config_delay_int);
+ }
}
void eDVBServicePlay::video_event(struct iTSMPEGDecoder::videoEvent event)