summaryrefslogtreecommitdiff
path: root/dxr3pesframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'dxr3pesframe.c')
-rw-r--r--dxr3pesframe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dxr3pesframe.c b/dxr3pesframe.c
index c0731da..817c51c 100644
--- a/dxr3pesframe.c
+++ b/dxr3pesframe.c
@@ -24,6 +24,7 @@
#include <linux/em8300.h>
#include <vdr/tools.h>
+#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