GNOME Bugzilla – Bug 787937
rtph265depay:Missing Unmap buffer if not implemented case
Last modified: 2017-09-26 08:10:38 UTC
Created attachment 360119 [details] Attached the patch Hi , In gst_rtp_h265_depay_process (), missed unmapped buffer in not_implemented error case. Attached the patch. Please review it Thanks.
Comment on attachment 360119 [details] Attached the patch >From 578d73fd528e233f3e18c093b23e2bdb9ec4fe8a Mon Sep 17 00:00:00 2001 >From: Ponnam Srinivas <p.srinivas@samsung.com> >Date: Wed, 20 Sep 2017 16:11:00 +0530 >Subject: [PATCH] rtph265depay Unmap buffer if not_implemented case > >--- > gst/rtp/gstrtph265depay.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c >index dca0add..474caa1 100644 >--- a/gst/rtp/gstrtph265depay.c >+++ b/gst/rtp/gstrtph265depay.c >@@ -1441,6 +1441,8 @@ not_implemented: > { > GST_ELEMENT_ERROR (rtph265depay, STREAM, FORMAT, > (NULL), ("NAL unit type %d not supported yet", nal_unit_type)); >+ if(outbuf) >+ gst_buffer_unmap (outbuf, &map); > return NULL; > } > } >-- >1.9.1 >
Created attachment 360122 [details] [review] patch file attached patch file is added
Review of attachment 360122 [details] [review]: ::: gst/rtp/gstrtph265depay.c @@ +1443,3 @@ (NULL), ("NAL unit type %d not supported yet", nal_unit_type)); + if(outbuf) + gst_buffer_unmap (outbuf, &map); This does not compile (there is no "map" in scope) and is also not correctly indendented (there's a tab here, missing space after the if, etc).
Review of attachment 360122 [details] [review]: Also the commit message is missing a ':'. It should read "rtph265depay: Unmap ..."
Created attachment 360170 [details] [review] Attached the patch attached patch. Please review
correct the indentation and code. compiled the code also. Please review it .
attached patch. Please review and share feedback
commit c0622addf68be0d49c3fea7967934abb6cdde7f4 (HEAD -> master) Author: Ponnam Srinivas <p.srinivas@samsung.com> Date: Thu Sep 21 13:59:00 2017 +0530 rtph265depay: Fix Memory leak in error case https://bugzilla.gnome.org/show_bug.cgi?id=787937