By Anders Holst: only record MPEG-4 I-frames to ap-file
[enigma2.git] / lib / dvb / pvrparse.cpp
index 35ba909169a034298ac02a0fe5f9e7024e4f7d09..dfc622492069dde979f5773fc550f3b4c6a8bd98 100644 (file)
@@ -370,7 +370,8 @@ int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
                                eDebug("Sequence header but no valid PTS value.");
                }
 
-               if (pkt[3] == 0x09) /* MPEG4 AVC unit access delimiter */
+               if (pkt[3] == 0x09 &&   /* MPEG4 AVC unit access delimiter */
+                        (pkt[4] >> 5) == 0) /* and I-frame */
                {
                        if (ptsvalid)
                        {