GNOME Bugzilla – Bug 654416
[mpegtsmux] gst_buffer_unref () call segfaults
Last modified: 2011-07-12 05:52:50 UTC
Upon testing my gstreamer application, i found that mpegtsmux plugin segfaults occasionally when trying to unref the buffer in the mpegtsmux_choose_best_stream () call. Specifically the line: gst/mpegtsmux/mpegtsmux.c:646 gst_buffer_unref (gst_collect_pads_pop (mux->collect, c_best)); I found that the gst_collect_pads_pop () call returns no buffer (NULL), this results in gst_buffer_unref (NULL) to be called resulting in a segmentation fault. Attached patch fixes the issue. P.S. The patch is generated against the git.
You forgot to attach the patch?
Created attachment 191763 [details] [review] [PATCH] the fix
commit 666807ed695be260befcba15638ef53789d9650d Author: Sameer Naik <sameer.subscriptions@damagehead.com> Date: Tue Jul 12 01:18:16 2011 +0530 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.