mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 19:22:15 +00:00
gst/avi/gstavidemux.c: You need to allocatate (len+1) characters to store a len size string.
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_reset), (gst_avi_demux_parse_stream), (gst_avi_demux_process_next_entry): You need to allocatate (len+1) characters to store a len size string. Also don't stop the processing task if the output pad is not linked.
This commit is contained in:
parent
7e8df65cc2
commit
6af187c535
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-08-04 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* gst/avi/gstavidemux.c: (gst_avi_demux_reset),
|
||||||
|
(gst_avi_demux_parse_stream), (gst_avi_demux_process_next_entry):
|
||||||
|
You need to allocatate (len+1) characters to store a len size string.
|
||||||
|
Also don't stop the processing task if the output pad is not linked.
|
||||||
|
|
||||||
2005-08-03 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-08-03 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_reset),
|
* ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_reset),
|
||||||
|
|
|
@ -162,7 +162,8 @@ gst_avi_demux_reset (GstAviDemux * avi)
|
||||||
for (i = 0; i < avi->num_streams; i++) {
|
for (i = 0; i < avi->num_streams; i++) {
|
||||||
g_free (avi->stream[i].strh);
|
g_free (avi->stream[i].strh);
|
||||||
g_free (avi->stream[i].strf.data);
|
g_free (avi->stream[i].strf.data);
|
||||||
g_free (avi->stream[i].name);
|
if (avi->stream[i].name)
|
||||||
|
g_free (avi->stream[i].name);
|
||||||
if (avi->stream[i].initdata)
|
if (avi->stream[i].initdata)
|
||||||
gst_buffer_unref (avi->stream[i].initdata);
|
gst_buffer_unref (avi->stream[i].initdata);
|
||||||
if (avi->stream[i].extradata)
|
if (avi->stream[i].extradata)
|
||||||
|
@ -963,7 +964,7 @@ gst_avi_demux_parse_stream (GstElement * element, GstBuffer * buf)
|
||||||
break;
|
break;
|
||||||
case GST_RIFF_TAG_strn:
|
case GST_RIFF_TAG_strn:
|
||||||
g_free (stream->name);
|
g_free (stream->name);
|
||||||
stream->name = g_new (gchar, GST_BUFFER_SIZE (sub));
|
stream->name = g_new (gchar, GST_BUFFER_SIZE (sub) + 1);
|
||||||
memcpy (stream->name, GST_BUFFER_DATA (sub), GST_BUFFER_SIZE (sub));
|
memcpy (stream->name, GST_BUFFER_DATA (sub), GST_BUFFER_SIZE (sub));
|
||||||
stream->name[GST_BUFFER_SIZE (sub)] = '\0';
|
stream->name[GST_BUFFER_SIZE (sub)] = '\0';
|
||||||
gst_buffer_unref (sub);
|
gst_buffer_unref (sub);
|
||||||
|
@ -2019,7 +2020,8 @@ gst_avi_demux_process_next_entry (GstAviDemux * avi)
|
||||||
GST_TIME_FORMAT " on pad %s",
|
GST_TIME_FORMAT " on pad %s",
|
||||||
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
||||||
gst_pad_get_name (stream->pad));
|
gst_pad_get_name (stream->pad));
|
||||||
if ((res = gst_pad_push (stream->pad, buf)) != GST_FLOW_OK)
|
if (!((res = gst_pad_push (stream->pad, buf)) & (GST_FLOW_OK
|
||||||
|
|| GST_FLOW_NOT_LINKED)))
|
||||||
return res;
|
return res;
|
||||||
processed = TRUE;
|
processed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue