From 606d611f9e65434eb1b53b9a9e203e58a578bc09 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 7 Jan 2010 11:14:16 +0100 Subject: check for max sizes supported by syncbuffer --- dxr3pesframe.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dxr3pesframe.c') diff --git a/dxr3pesframe.c b/dxr3pesframe.c index c0731da..817c51c 100644 --- a/dxr3pesframe.c +++ b/dxr3pesframe.c @@ -24,6 +24,7 @@ #include #include +#include "dxr3demuxdevice.h" // ================================== bool cDxr3PesFrame::parse(const uint8_t *pes, uint32_t length) @@ -75,6 +76,14 @@ bool cDxr3PesFrame::parse(const uint8_t *pes, uint32_t length) m_payload = &pes[payloadStart]; m_payloadLength = length - payloadStart; + // check for max sizes supported by syncbuffer + if (m_pesDataType == PES_VIDEO_DATA && m_payloadLength > (uint32_t)VIDEO_MAX_FRAME_SIZE) { + return false; + } + if (m_pesDataType == PES_AUDIO_DATA && m_payloadLength > (uint32_t)AUIDO_MAX_FRAME_SIZE) { + return false; + } + if (m_pesDataType == PES_VIDEO_DATA) { // we can get some informations about the video payload -- cgit v1.2.3