int CDVDVideoCodecAmlogic::Decode(uint8_t *pData, int iSize, double dts, double pts) { // Handle Input, add demuxer packet to input queue, we must accept it or // it will be discarded as VideoPlayerVideo has no concept of "try again". if (pData) { if (m_bitstream) { if (!m_bitstream->Convert(pData, iSize)) return VC_ERROR; pData = m_bitstream->GetConvertBuffer(); iSize = m_bitstream->GetConvertSize(); } if (m_bitparser) m_bitparser->FindIdrSlice(pData, iSize); FrameRateTracking( pData, iSize, dts, pts); } if (!m_opened) { if (m_Codec && !m_Codec->OpenDecoder(m_hints)) CLog::Log(LOGERROR, "%s: Failed to open Amlogic Codec", __MODULE_NAME__); m_opened = true; } if (m_hints.ptsinvalid) pts = DVD_NOPTS_VALUE; return m_Codec->Decode(pData, iSize, dts, pts); }
int CDVDVideoCodecAmlogic::Decode(BYTE *pData, int iSize, double dts, double pts) { // Handle Input, add demuxer packet to input queue, we must accept it or // it will be discarded as DVDPlayerVideo has no concept of "try again". if (!m_opened) { if (m_Codec && !m_Codec->OpenDecoder(m_hints)) CLog::Log(LOGERROR, "%s: Failed to open Amlogic Codec", __MODULE_NAME__); m_opened = true; } if (m_hints.ptsinvalid) pts = DVD_NOPTS_VALUE; if (pData) FrameRateTracking( pData, iSize, dts, pts); return m_Codec->Decode(pData, iSize, dts, pts); }