[MPlayer-cvslog] r32688 - trunk/libmpdemux/demuxer.h

reimar subversion at mplayerhq.hu
Sat Dec 11 17:36:17 CET 2010


Author: reimar
Date: Sat Dec 11 17:36:17 2010
New Revision: 32688

Log:
Fix insufficient padding/memset at the end of demuxer packets.

Modified:
   trunk/libmpdemux/demuxer.h

Modified: trunk/libmpdemux/demuxer.h
==============================================================================
--- trunk/libmpdemux/demuxer.h	Sat Dec 11 16:49:09 2010	(r32687)
+++ trunk/libmpdemux/demuxer.h	Sat Dec 11 17:36:17 2010	(r32688)
@@ -293,7 +293,7 @@ static inline demux_packet_t* new_demux_
   dp->master=NULL;
   dp->buffer=NULL;
   if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + MP_INPUT_BUFFER_PADDING_SIZE)))
-    memset(dp->buffer + len, 0, 8);
+    memset(dp->buffer + len, 0, MP_INPUT_BUFFER_PADDING_SIZE);
   else
     dp->len = 0;
   return dp;
@@ -303,7 +303,7 @@ static inline void resize_demux_packet(d
 {
   if(len > 0)
   {
-     dp->buffer=(unsigned char *)realloc(dp->buffer,len+8);
+     dp->buffer=(unsigned char *)realloc(dp->buffer,len + MP_INPUT_BUFFER_PADDING_SIZE);
   }
   else
   {
@@ -312,7 +312,7 @@ static inline void resize_demux_packet(d
   }
   dp->len=len;
   if (dp->buffer)
-     memset(dp->buffer + len, 0, 8);
+     memset(dp->buffer + len, 0, MP_INPUT_BUFFER_PADDING_SIZE);
   else
      dp->len = 0;
 }


More information about the MPlayer-cvslog mailing list