projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c797d40
)
parse mpeg4 AVC UADs
author
Felix Domke
<tmbinc@elitedvb.net>
Wed, 30 Jan 2008 13:45:23 +0000
(13:45 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Wed, 30 Jan 2008 13:45:23 +0000
(13:45 +0000)
lib/dvb/pvrparse.cpp
patch
|
blob
|
history
diff --git
a/lib/dvb/pvrparse.cpp
b/lib/dvb/pvrparse.cpp
index
a611332
..
c96669b
100644
(file)
--- a/
lib/dvb/pvrparse.cpp
+++ b/
lib/dvb/pvrparse.cpp
@@
-316,8
+316,16
@@
int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
/* advance to payload */
pkt += pkt[8] + 9;
/* advance to payload */
pkt += pkt[8] + 9;
-
+
+ /* sometimes, there are zeros before the startcode. */
+ while (pkt < (end-4))
+ if (pkt[0] || pkt[1] || pkt[2])
+ break;
+ else
+ pkt++;
+
/* if startcode found */
/* if startcode found */
+// eDebug("%02x %02x %02x %02x", pkt[0], pkt[1], pkt[2], pkt[3]);
if (!(pkt[0] || pkt[1] || (pkt[2] != 1)))
{
if (pkt[3] == 0xb3) /* sequence header */
if (!(pkt[0] || pkt[1] || (pkt[2] != 1)))
{
if (pkt[3] == 0xb3) /* sequence header */
@@
-329,6
+337,16
@@
int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
} else
eDebug("Sequence header but no valid PTS value.");
}
} else
eDebug("Sequence header but no valid PTS value.");
}
+
+ if (pkt[3] == 0x09) /* MPEG4 AVC unit access delimiter */
+ {
+ if (ptsvalid)
+ {
+ m_streaminfo.m_access_points[offset] = pts;
+ eDebug("MPEG4 AVC UAD at %llx, pts %llx", offset, pts);
+ } else
+ eDebug("MPEG4 AVC UAD but no valid PTS value.");
+ }
}
return 0;
}
}
return 0;
}