After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787937 - rtph265depay:Missing Unmap buffer if not implemented case
rtph265depay:Missing Unmap buffer if not implemented case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.13.x
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-20 10:55 UTC by Ponnam Srinivas
Modified: 2017-09-26 08:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attached the patch (717 bytes, text/plain)
2017-09-20 10:55 UTC, Ponnam Srinivas
  Details
patch file attached (716 bytes, patch)
2017-09-20 11:19 UTC, Ponnam Srinivas
none Details | Review
Attached the patch (1.15 KB, patch)
2017-09-21 08:40 UTC, Ponnam Srinivas
committed Details | Review

Description Ponnam Srinivas 2017-09-20 10:55:27 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 1 Ponnam Srinivas 2017-09-20 10:56:30 UTC
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
>
Comment 2 Ponnam Srinivas 2017-09-20 11:19:09 UTC
Created attachment 360122 [details] [review]
patch file attached

patch file is added
Comment 3 Sebastian Dröge (slomo) 2017-09-20 14:53:41 UTC
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).
Comment 4 Sebastian Dröge (slomo) 2017-09-20 14:54:08 UTC
Review of attachment 360122 [details] [review]:

Also the commit message is missing a ':'. It should read "rtph265depay: Unmap ..."
Comment 5 Ponnam Srinivas 2017-09-21 08:40:11 UTC
Created attachment 360170 [details] [review]
Attached the patch

attached patch. Please review
Comment 6 Ponnam Srinivas 2017-09-21 08:41:15 UTC
correct the indentation and code. compiled the code also. Please review it .
Comment 7 Ponnam Srinivas 2017-09-23 13:08:14 UTC
attached patch. Please review and share feedback
Comment 8 Sebastian Dröge (slomo) 2017-09-26 08:10:22 UTC
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