]> git.vomp.tv Git - vompclient-marten.git/commitdiff
*** empty log message ***
authorMark Calderbank <mark@vomp.tv>
Tue, 26 Sep 2006 13:05:39 +0000 (13:05 +0000)
committerMark Calderbank <mark@vomp.tv>
Tue, 26 Sep 2006 13:05:39 +0000 (13:05 +0000)
demuxer.cc
demuxer.h

index b519960a19f2436a485718c3d4194b3857e1c1fe..3b1c6d9fb9d39bb3753c5c4541a9eebf2ad86f1d 100644 (file)
@@ -315,8 +315,6 @@ UINT Demuxer::PESPacket::findPictureHeader()
   return pos-3;
 }
 
-
-// static function for stripping audio from a buffer containing an I Frame and its audio
 UINT Demuxer::stripAudio(UCHAR* buf, UINT len)
 {
   UINT read_pos = 0, write_pos = 0;
@@ -325,8 +323,8 @@ UINT Demuxer::stripAudio(UCHAR* buf, UINT len)
   pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]);
   while (read_pos + 7 <= len)
   {
-    pattern = ((pattern << 8) & 0xFFFFFFFF) | buf[read_pos+3];
-    if (pattern < 0x000001E0 || pattern > 0x000001EF)
+    pattern = ((pattern & 0xFFFFFF) << 8) | buf[read_pos+3];
+    if (pattern < 0x100|PESTYPE_VID0 || pattern > 0x100|PESTYPE_VIDMAX)
       read_pos++;
     else
     {
index ecfc011d3fd7e3d8bf64122c16633ae5de23f6f1..d168dd0cb3d2edf719896dd403999aff832e4c9c 100644 (file)
--- a/demuxer.h
+++ b/demuxer.h
@@ -95,7 +95,9 @@ protected:
       ASPECT_16_9 = 3
     };
 
-    // Strip audio packets from buffer, leaving video only *static function*
+    // Remove all data from a buffer apart from video PES packets.
+    // Returns the length of the reduced data.
+    // *static function*
     static UINT stripAudio(UCHAR* buf, UINT len);
 
   protected: