mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
don't pass random pointers to pull_range
This commit is contained in:
parent
e13a7c76a7
commit
dfb8e7cb2c
3 changed files with 5 additions and 3 deletions
|
@ -2183,7 +2183,7 @@ static GstFlowReturn
|
||||||
gst_ogg_demux_get_data (GstOggDemux * ogg, gint64 end_offset)
|
gst_ogg_demux_get_data (GstOggDemux * ogg, gint64 end_offset)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer = NULL;
|
||||||
|
|
||||||
GST_LOG_OBJECT (ogg,
|
GST_LOG_OBJECT (ogg,
|
||||||
"get data %" G_GINT64_FORMAT " %" G_GINT64_FORMAT " %" G_GINT64_FORMAT,
|
"get data %" G_GINT64_FORMAT " %" G_GINT64_FORMAT " %" G_GINT64_FORMAT,
|
||||||
|
@ -4202,7 +4202,7 @@ static GstFlowReturn
|
||||||
gst_ogg_demux_loop_forward (GstOggDemux * ogg)
|
gst_ogg_demux_loop_forward (GstOggDemux * ogg)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer = NULL;
|
||||||
|
|
||||||
if (ogg->offset == ogg->length) {
|
if (ogg->offset == ogg->length) {
|
||||||
GST_LOG_OBJECT (ogg, "no more data to pull %" G_GINT64_FORMAT
|
GST_LOG_OBJECT (ogg, "no more data to pull %" G_GINT64_FORMAT
|
||||||
|
|
|
@ -1999,7 +1999,7 @@ gst_audio_base_sink_callback (GstAudioRingBuffer * rbuf, guint8 * data,
|
||||||
{
|
{
|
||||||
GstBaseSink *basesink;
|
GstBaseSink *basesink;
|
||||||
GstAudioBaseSink *sink;
|
GstAudioBaseSink *sink;
|
||||||
GstBuffer *buf;
|
GstBuffer *buf = NULL;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
gsize size;
|
gsize size;
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ gst_riff_read_chunk (GstElement * element,
|
||||||
|
|
||||||
skip_junk:
|
skip_junk:
|
||||||
size = 8;
|
size = 8;
|
||||||
|
buf = NULL;
|
||||||
if ((res = gst_pad_pull_range (pad, offset, size, &buf)) != GST_FLOW_OK)
|
if ((res = gst_pad_pull_range (pad, offset, size, &buf)) != GST_FLOW_OK)
|
||||||
return res;
|
return res;
|
||||||
else if (gst_buffer_get_size (buf) < size)
|
else if (gst_buffer_get_size (buf) < size)
|
||||||
|
@ -87,6 +88,7 @@ skip_junk:
|
||||||
goto skip_junk;
|
goto skip_junk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buf = NULL;
|
||||||
if ((res = gst_pad_pull_range (pad, offset + 8, size, &buf)) != GST_FLOW_OK)
|
if ((res = gst_pad_pull_range (pad, offset + 8, size, &buf)) != GST_FLOW_OK)
|
||||||
return res;
|
return res;
|
||||||
else if (gst_buffer_get_size (buf) < size)
|
else if (gst_buffer_get_size (buf) < size)
|
||||||
|
|
Loading…
Reference in a new issue