Fix isSecondary() Method

This commit is contained in:
jcdr428 2022-01-03 21:35:02 +01:00
parent 72509eba6a
commit 6808e99688
4 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,8 @@ bool AC3StreamReader::isPriorityData(AVPacket* packet)
return (packet->size >= 2 && packet->data[0] == 0x0B && packet->data[1] == 0x77 && m_bsid <= 10); return (packet->size >= 2 && packet->data[0] == 0x0B && packet->data[1] == 0x77 && m_bsid <= 10);
} }
bool AC3StreamReader::isSecondary() { return m_secondary; };
void AC3StreamReader::writePESExtension(PESPacket* pesPacket, const AVPacket& avPacket) void AC3StreamReader::writePESExtension(PESPacket* pesPacket, const AVPacket& avPacket)
{ {
if (m_useNewStyleAudioPES) if (m_useNewStyleAudioPES)

View File

@ -36,6 +36,7 @@ class AC3StreamReader : public SimplePacketizerReader, public AC3Codec
int getChannels() override { return AC3Codec::m_channels; } int getChannels() override { return AC3Codec::m_channels; }
bool isPriorityData(AVPacket* packet) override; bool isPriorityData(AVPacket* packet) override;
bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); } bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); }
bool isSecondary();
protected: protected:
int getHeaderLen() override { return AC3Codec::getHeaderLen(); } int getHeaderLen() override { return AC3Codec::getHeaderLen(); }

View File

@ -425,6 +425,8 @@ bool DTSStreamReader::isPriorityData(AVPacket* packet)
(packet->data[0] == 0xfe && packet->data[1] == 0x7f)); (packet->data[0] == 0xfe && packet->data[1] == 0x7f));
} }
bool DTSStreamReader::isSecondary() { return m_secondary; }
int DTSStreamReader::decodeFrame(uint8_t* buff, uint8_t* end, int& skipBytes, int& skipBeforeBytes) int DTSStreamReader::decodeFrame(uint8_t* buff, uint8_t* end, int& skipBytes, int& skipBeforeBytes)
{ {
uint8_t* afterFrameData = buff; uint8_t* afterFrameData = buff;

View File

@ -64,6 +64,7 @@ class DTSStreamReader : public SimplePacketizerReader
bool isPriorityData(AVPacket* packet) override; bool isPriorityData(AVPacket* packet) override;
bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); } bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); }
void setTestMode(bool value) override { m_testMode = value; } void setTestMode(bool value) override { m_testMode = value; }
bool isSecondary();
protected: protected:
int getHeaderLen() override { return DTS_HEADER_SIZE; }; int getHeaderLen() override { return DTS_HEADER_SIZE; };