[MPlayer-users] Crash in free_dumuxer

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jan 8 22:27:35 CET 2008


Hello,
On Tue, Jan 08, 2008 at 09:06:44PM +0000, Carl Eugen Hoyos wrote:
> Kevin DeKorte <kdekorte <at> gmail.com> writes:
> > As of yesterdays SVN, when playing certain video files that used to play
> > fine, mplayer is crashing on exit (hitting the ESC key), in free_demuxer.
> 
> Crashes since r25642.

The real problem is probably stupidity in the mov demuxer though.
Please test attached patch.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demux_mov.c
===================================================================
--- libmpdemux/demux_mov.c	(revision 25639)
+++ libmpdemux/demux_mov.c	(working copy)
@@ -747,13 +747,15 @@
 		         default:
 			  if (len > 8 && len + 44 <= trak->stdata_len) {
 				sh->codecdata_len = len-8;
-				sh->codecdata = trak->stdata+44+8;
+				sh->codecdata = malloc(sh->codecdata_len);
+				memcpy(sh->codecdata, trak->stdata+44+8, sh->codecdata_len);
 			  }
 		        }
 		    } else {
 		      if (len > 8 && len + 44 <= trak->stdata_len) {
 		    sh->codecdata_len = len-8;
-		    sh->codecdata = trak->stdata+44+8;
+		    sh->codecdata = malloc(sh->codecdata_len);
+		    memcpy(sh->codecdata, trak->stdata+44+8, sh->codecdata_len);
 		      }
 		    }
 		  }


More information about the MPlayer-users mailing list