don't pass random pointers to pull_range

This commit is contained in:
Wim Taymans 2012-03-16 21:48:02 +01:00
parent fdfea36e93
commit 4aa8c11d85
2 changed files with 3 additions and 0 deletions

View file

@ -629,6 +629,7 @@ gst_real_audio_demux_loop (GstRealAudioDemux * demux)
if (demux->upstream_size > 0 && demux->offset >= demux->upstream_size)
goto eos;
buf = NULL;
ret = gst_pad_pull_range (demux->sinkpad, demux->offset, bytes_needed, &buf);
if (ret != GST_FLOW_OK)

View file

@ -345,6 +345,7 @@ gst_rmdemux_validate_offset (GstRMDemux * rmdemux)
gboolean ret = TRUE;
GstMapInfo map;
buffer = NULL;
flowret = gst_pad_pull_range (rmdemux->sinkpad, rmdemux->offset, 4, &buffer);
if (flowret != GST_FLOW_OK) {
@ -837,6 +838,7 @@ gst_rmdemux_loop (GstPad * pad)
size = rmdemux->size;
}
buffer = NULL;
ret = gst_pad_pull_range (pad, rmdemux->offset, size, &buffer);
if (ret != GST_FLOW_OK) {
if (rmdemux->offset == rmdemux->index_offset) {