mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 13:38:48 +00:00
gst/qtdemux/qtdemux.c: Properly free QTDemuxSamples array.
Original commit message from CVS: * 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 :(
This commit is contained in:
parent
8deb4fbd92
commit
7522192fab
2 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-11-12 Edward Hervey <bilboed@bilboed.com>
|
||||||
|
|
||||||
|
* 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 <ensonic@users.sf.net>
|
2007-11-12 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/avi/gstavidemux.c:
|
* gst/avi/gstavidemux.c:
|
||||||
|
|
|
@ -914,10 +914,12 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
if (stream->pad)
|
if (stream->pad)
|
||||||
gst_element_remove_pad (element, stream->pad);
|
gst_element_remove_pad (element, stream->pad);
|
||||||
g_free (stream->samples);
|
if (stream->samples)
|
||||||
|
g_free (stream->samples);
|
||||||
if (stream->caps)
|
if (stream->caps)
|
||||||
gst_caps_unref (stream->caps);
|
gst_caps_unref (stream->caps);
|
||||||
g_free (stream->segments);
|
if (stream->segments)
|
||||||
|
g_free (stream->segments);
|
||||||
g_free (stream);
|
g_free (stream);
|
||||||
}
|
}
|
||||||
qtdemux->n_streams = 0;
|
qtdemux->n_streams = 0;
|
||||||
|
@ -2570,8 +2572,10 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
||||||
for (i = 0; i < n_sample_syncs; i++) {
|
for (i = 0; i < n_sample_syncs; i++) {
|
||||||
/* note that the first sample is index 1, not 0 */
|
/* note that the first sample is index 1, not 0 */
|
||||||
index = QT_UINT32 ((guint8 *) stss->data + offset);
|
index = QT_UINT32 ((guint8 *) stss->data + offset);
|
||||||
samples[index - 1].keyframe = TRUE;
|
if (index > 0) {
|
||||||
offset += 4;
|
samples[index - 1].keyframe = TRUE;
|
||||||
|
offset += 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue