#include <lib/gui/esubtitle.h>
#include <sys/vfs.h>
+#include <sys/stat.h>
#include <byteswap.h>
#include <netinet/in.h>
m_service_handler.free();
if (m_is_pvr && m_cuesheet_changed)
- saveCuesheet();
+ {
+ struct stat s;
+ /* save cuesheet only when main file is accessible. */
+ if (!::stat(m_reference.path.c_str(), &s))
+ saveCuesheet();
+ }
return 0;
}
case sIsCrypted: return program.isCrypted();
case sVideoPID: if (program.videoStreams.empty()) return -1; return program.videoStreams[0].pid;
case sVideoType: if (program.videoStreams.empty()) return -1; return program.videoStreams[0].type;
- case sAudioPID: if (program.audioStreams.empty()) return -1; return program.audioStreams[m_current_audio_stream].pid;
+ case sAudioPID: if (program.audioStreams.empty()) return -1; return program.audioStreams[0].pid;
case sPCRPID: return program.pcrPid;
case sPMTPID: return program.pmtPid;
case sTXTPID: return program.textPid;
}
}
- m_current_audio_stream = i;
-
return 0;
}
m_decoder->setPCMDelay(pcm_delay == -1 ? 0 : pcm_delay);
m_decoder->setVideoPID(vpid, vpidtype);
- m_current_audio_stream = 0;
m_decoder->setAudioPID(apid, apidtype);
if (!(m_is_pvr || m_timeshift_active || !m_is_primary))
{