mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
mpegtsmux: fix segfault if gst_collect_pads_pop () returns no buffer
In mpegtsmux_choose_best_stream () call if the gst_collect_pads_pop () call returns no buffer (NULL), the plugin SegFaults in the gst_buffer_unref call. To fix this we check if a valid buffer is returned before calling gst_buffer_unref (). Fixes bug #654416.
This commit is contained in:
parent
83c4e8814e
commit
666807ed69
1 changed files with 3 additions and 1 deletions
|
@ -642,7 +642,9 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c_best) {
|
if (c_best) {
|
||||||
gst_buffer_unref (gst_collect_pads_pop (mux->collect, c_best));
|
GstBuffer *buffer;
|
||||||
|
if ((buffer = gst_collect_pads_pop (mux->collect, c_best)))
|
||||||
|
gst_buffer_unref (buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return best;
|
return best;
|
||||||
|
|
Loading…
Reference in a new issue