Merge commit 'origin/translations' into experimental
[enigma2.git] / lib / dvb / decoder.cpp
index 710cc421ec59a6a476249c8bd6917df35639e7fc..ef8dadc387bdcb59b306ab573d83ebe69e836b31 100644 (file)
@@ -1045,9 +1045,9 @@ int eTSMPEGDecoder::setState()
 int eTSMPEGDecoder::m_pcm_delay=-1,
        eTSMPEGDecoder::m_ac3_delay=-1;
 
-RESULT eTSMPEGDecoder::setPCMDelay(int delay)
+RESULT eTSMPEGDecoder::setHwPCMDelay(int delay)
 {
-       if (m_decoder == 0 && delay != m_pcm_delay )
+       if (delay != m_pcm_delay )
        {
                FILE *fp = fopen("/proc/stb/audio/audio_delay_pcm", "w");
                if (fp)
@@ -1061,9 +1061,9 @@ RESULT eTSMPEGDecoder::setPCMDelay(int delay)
        return -1;
 }
 
-RESULT eTSMPEGDecoder::setAC3Delay(int delay)
+RESULT eTSMPEGDecoder::setHwAC3Delay(int delay)
 {
-       if ( m_decoder == 0 && delay != m_ac3_delay )
+       if ( delay != m_ac3_delay )
        {
                FILE *fp = fopen("/proc/stb/audio/audio_delay_bitstream", "w");
                if (fp)
@@ -1077,6 +1077,17 @@ RESULT eTSMPEGDecoder::setAC3Delay(int delay)
        return -1;
 }
 
+
+RESULT eTSMPEGDecoder::setPCMDelay(int delay)
+{
+       return m_decoder == 0 ? setHwPCMDelay(delay) : -1;
+}
+
+RESULT eTSMPEGDecoder::setAC3Delay(int delay)
+{
+       return m_decoder == 0 ? setHwAC3Delay(delay) : -1;
+}
+
 eTSMPEGDecoder::eTSMPEGDecoder(eDVBDemux *demux, int decoder)
        : m_demux(demux), 
                m_vpid(-1), m_vtype(-1), m_apid(-1), m_atype(-1), m_pcrpid(-1), m_textpid(-1),