From: <bi...@ke...> - 2007-11-12 17:59:51
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: bilboed Date: Mon Nov 12 2007 17:59:54 UTC Log message: * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (qtdemux_parse_samples): Properly free QTDemuxSamples array. Protect table write with a sensible check, some files apparently DO contain stts values starting with 0 :( Modified files: . : ChangeLog gst/qtdemux : qtdemux.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3158&r2=1.3159 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/qtdemux/qtdemux.c.diff?r1=1.205&r2=1.206 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3158 retrieving revision 1.3159 diff -u -d -r1.3158 -r1.3159 --- ChangeLog 12 Nov 2007 17:21:57 -0000 1.3158 +++ ChangeLog 12 Nov 2007 17:59:39 -0000 1.3159 @@ -1,3 +1,11 @@ +2007-11-12 Edward Hervey <bi...@bi...> + + * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), + (qtdemux_parse_samples): + Properly free QTDemuxSamples array. + Protect table write with a sensible check, some files apparently DO contain + stts values starting with 0 :( 2007-11-12 Stefan Kost <en...@us...> * gst/avi/gstavidemux.c: Index: qtdemux.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/qtdemux/qtdemux.c,v retrieving revision 1.205 retrieving revision 1.206 diff -u -d -r1.205 -r1.206 --- qtdemux.c 12 Nov 2007 17:21:59 -0000 1.205 +++ qtdemux.c 12 Nov 2007 17:59:40 -0000 1.206 @@ -914,10 +914,12 @@ if (stream->pad) gst_element_remove_pad (element, stream->pad); - g_free (stream->samples); + if (stream->samples) + g_free (stream->samples); if (stream->caps) gst_caps_unref (stream->caps); - g_free (stream->segments); + if (stream->segments) + g_free (stream->segments); g_free (stream); } qtdemux->n_streams = 0; @@ -2570,8 +2572,10 @@ for (i = 0; i < n_sample_syncs; i++) { /* note that the first sample is index 1, not 0 */ index = QT_UINT32 ((guint8 *) stss->data + offset); - samples[index - 1].keyframe = TRUE; - offset += 4; + if (index > 0) { + samples[index - 1].keyframe = TRUE; + offset += 4; + } } } else { |