[MPlayer-users] .TY+ parsing / junk data not skipped over

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Sep 15 15:40:20 CEST 2007


Hello,
On Wed, Sep 12, 2007 at 06:30:29PM -0600, Mike Hodson wrote:
> [...]  Except when there
> apparently is a segment change (the tivo uses multiple file segments
> for recording a show) mplayer apparently plays "junk" that exists in
> the .ty file, but it seems should just be skipped over.

Attached patch works for the sample you uploaded, but I'm not sure it is
quite right. If there are some files where it does not help (or breaks
normal playback) please make the available to me as well (cutting out
only the interesting part).

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demux_ty.c
===================================================================
--- libmpdemux/demux_ty.c	(revision 24527)
+++ libmpdemux/demux_ty.c	(working copy)
@@ -522,6 +522,12 @@
       int type = recPtr[ 3 ];
       int nybbleType = recPtr[ 2 ] & 0x0f;
       recordsDecoded++;
+      if (recPtr[10] & 0x08) {
+         if ( size > 0 && size + offset <= CHUNKSIZE )
+            offset += size;
+         recPtr += 16;
+         continue;
+      }
 
       mp_msg( MSGT_DEMUX, MSGL_DBG3,
          "ty:Record Type %x/%x %d\n", nybbleType, type, size );


More information about the MPlayer-users mailing list