diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-01-30 13:45:23 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-01-30 13:45:23 +0000 |
| commit | d7026a3a9370970633dd938b3b5ab9b2dc0a297f (patch) | |
| tree | fe4db69ec6f55c0e1f211287f700ad5069846fa9 /lib/dvb/pvrparse.cpp | |
| parent | c797d4040a1dfac3873b481111a84a5c557432f3 (diff) | |
| download | enigma2-d7026a3a9370970633dd938b3b5ab9b2dc0a297f.tar.gz enigma2-d7026a3a9370970633dd938b3b5ab9b2dc0a297f.zip | |
parse mpeg4 AVC UADs
Diffstat (limited to 'lib/dvb/pvrparse.cpp')
| -rw-r--r-- | lib/dvb/pvrparse.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/dvb/pvrparse.cpp b/lib/dvb/pvrparse.cpp index a6113329..c96669b0 100644 --- 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; - + + /* sometimes, there are zeros before the startcode. */ + while (pkt < (end-4)) + if (pkt[0] || pkt[1] || pkt[2]) + break; + else + pkt++; + /* 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 */ @@ -329,6 +337,16 @@ int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset) } 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; } |
