[MPlayer-cvslog] r32866 - trunk/libmpdemux/demux_ts.c

reimar subversion at mplayerhq.hu
Sun Feb 6 15:06:36 CET 2011


Author: reimar
Date: Sun Feb  6 15:06:35 2011
New Revision: 32866

Log:
Change SVB SPU stream format in TS demuxer so it can be decoded by
libavcodec (as soon as lavc is fixed not to fail just because of an
extra padding byte).

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sun Feb  6 15:03:10 2011	(r32865)
+++ trunk/libmpdemux/demux_ts.c	Sun Feb  6 15:06:35 2011	(r32866)
@@ -1483,10 +1483,11 @@ static int pes_parse2(unsigned char *buf
 		}
 		/* SPU SUBS */
 		else if(type_from_pmt == SPU_DVB ||
-		(packet_len >= 1 && (p[0] == 0x20) && pes_is_aligned)) // && p[1] == 0x00))
+		(packet_len >= 2 && (p[0] == 0x20) && pes_is_aligned)) // && p[1] == 0x00))
 		{
-			es->start = p;
-			es->size  = packet_len;
+			// offset/length fiddling to make decoding with lavc possible
+			es->start = p + 2;
+			es->size  = packet_len - 2;
 			es->type  = SPU_DVB;
 			es->payload_size -= packet_len;
 


More information about the MPlayer-cvslog mailing list