From 7bf2609378e9fddbf1b528b0576d6b64993deb92 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Fri, 15 Feb 2013 08:23:59 +0100 Subject: [PATCH] Fix for damaged stream, reported by hondanxs --- videoomx.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/videoomx.cc b/videoomx.cc index f3b3002..fdf7b5d 100644 --- a/videoomx.cc +++ b/videoomx.cc @@ -2643,6 +2643,10 @@ UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, // if (h264) Log::getInstance()->log("Video", Log::DEBUG, "PES info %x %x %x %x", // buffer[packet.pos_buffer+0],buffer[packet.pos_buffer+1],buffer[packet.pos_buffer+2],buffer[packet.pos_buffer+3]); *samplepos+=headerstrip; + if (headerstrip>=packet.length) { + *samplepos=packet.length;// Packet is obviously damaged + return packet.length;//skip it! + } if ( packet.synched ) { if (!firstsynched) { //Log::getInstance()->log("Video", Log::DEBUG, "DMP mark 2a"); -- 2.39.5