mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
mpegdemux: don't ignore GstFlowReturn values
don't ignore the return value of pull_range because we only get a valid non-NULL buffer when the return value is GST_FLOW_OK. Avoids a crash when the pipeline is shutting down.
This commit is contained in:
parent
518d98899e
commit
9a0e1e0dca
1 changed files with 6 additions and 0 deletions
|
@ -2195,6 +2195,9 @@ gst_flups_demux_scan_forward_ts (GstFluPSDemux * demux, guint64 * pos,
|
|||
|
||||
/* read some data */
|
||||
ret = gst_pad_pull_range (demux->sinkpad, offset, to_read, &buffer);
|
||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||
return FALSE;
|
||||
|
||||
data = GST_BUFFER_DATA (buffer);
|
||||
end_scan = GST_BUFFER_SIZE (buffer) - scan_sz;
|
||||
/* scan the block */
|
||||
|
@ -2242,6 +2245,9 @@ gst_flups_demux_scan_backward_ts (GstFluPSDemux * demux, guint64 * pos,
|
|||
}
|
||||
/* read some data */
|
||||
ret = gst_pad_pull_range (demux->sinkpad, offset, to_read, &buffer);
|
||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||
return FALSE;
|
||||
|
||||
start_scan = GST_BUFFER_SIZE (buffer) - scan_sz;
|
||||
data = GST_BUFFER_DATA (buffer) + start_scan;
|
||||
/* scan the block */
|
||||
|
|
Loading…
Reference in a new issue