diff options
Diffstat (limited to 'dxr3device.c')
-rw-r--r-- | dxr3device.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dxr3device.c b/dxr3device.c index 3418f33..bd75fd6 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -384,11 +384,20 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length) if (m_strBuf.length()) { m_strBuf.append((const char*)Data, Length); - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)m_strBuf.data(), m_strBuf.length(), true); + if (m_PlayMode == pmAudioOnly) { + retLength = m_DemuxDevice.DemuxAudioPes((const uint8_t*)m_strBuf.data(), m_strBuf.length()); + } else { + retLength = m_DemuxDevice.DemuxPes((const uint8_t*)m_strBuf.data(), m_strBuf.length(), true); + } + } else { - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)Data, Length, true); + if (m_PlayMode == pmAudioOnly) { + retLength = m_DemuxDevice.DemuxAudioPes((const uint8_t*)Data, Length); + } else { + retLength = m_DemuxDevice.DemuxPes((const uint8_t*)Data, Length, true); + } } Length -= retLength; |