GNOME Bugzilla – Bug 784932
basesink: buffer leaks if preroll failed
Last modified: 2017-07-14 07:41:41 UTC
Created attachment 355564 [details] [review] [PATCH] basesink: fix buffer leaks if preroll failed In gst_base_sink_chain_unlocked, it is supposed to unref the obj when it's done. When 'gst_base_sink_do_preroll' returns error and goes to 'preroll_failed', the object is not unreferenced. Problem: video freeze after "pause -> 1/2 FF -> resume -> pause -> 1/2 FF ..." repeatedly --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -3657,6 +3657,7 @@ dropped: preroll_failed: { GST_DEBUG_OBJECT (basesink, "preroll failed: %s", gst_flow_get_name (ret)); + gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj)); return ret; } }
Thanks! commit 5bd4603ed3923e8fa8e81ed0230a0fa219b191b2 Author: Jason Lin <shangchieh@realtek.com> Date: Thu Jul 13 21:52:34 2017 +0800 basesink: fix buffer leaks if preroll failed buffer is not unreferened if preroll failed :Detailed Notes: - Problem : video freeze when switching from pause to 1/2-FF repeatedly - RootCause : buffer leaks in basesink - Solution : unref the buffer if prerolled failed :Testing Preformed: How to Test : pause -> 1/2 FF -> resume -> pause -> 1/2 FF ... https://bugzilla.gnome.org/show_bug.cgi?id=784932
and 1.12 d7c47d1562b5c86c194f830f50d5a7893a446274