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 788194 - glfilter: Unmap video frame in error case
glfilter: Unmap video frame in error case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.13.x
Other All
: Normal major
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-26 14:15 UTC by Ponnam Srinivas
Modified: 2017-09-28 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
attached patch (762 bytes, patch)
2017-09-26 14:15 UTC, Ponnam Srinivas
none Details | Review
patch file attached (833 bytes, patch)
2017-09-28 10:53 UTC, Ponnam Srinivas
committed Details | Review

Description Ponnam Srinivas 2017-09-26 14:15:10 UTC
Created attachment 360453 [details] [review]
attached patch

Hi,
  
  In gst_gl_filter_filter_texture() function, missed Unmap video frame in failed case
  
  code:
   if (!gst_video_frame_map (&gl_frame, &filter->in_info, inbuf,
          GST_MAP_READ | GST_MAP_GL)) {
    ret = FALSE;
    goto inbuf_error;
  }

  in_tex = gl_frame.map[0].memory;
  if (!gst_is_gl_memory (in_tex)) {
    ret = FALSE;
    GST_ERROR_OBJECT (filter, "Input memory must be GstGLMemory");
    goto inbuf_error;
  }
	
  sol: gst_video_frame_unmap (&gl_frame); added 

  Patch attached. Please review and share feedback.
Comment 1 Sebastian Dröge (slomo) 2017-09-28 09:36:19 UTC
Comment on attachment 360453 [details] [review]
attached patch

Please mark your patches as such when attaching them :)
Comment 2 Sebastian Dröge (slomo) 2017-09-28 10:27:57 UTC
Review of attachment 360453 [details] [review]:

::: gst-libs/gst/gl/gstglfilter.c
@@ +930,1 @@
     goto inbuf_error;

Just "goto unmap_out_error" here, that already does what you need
Comment 3 Ponnam Srinivas 2017-09-28 10:53:54 UTC
Created attachment 360592 [details] [review]
patch file attached

added changes as per comments . patch attached . Please review
Comment 4 Sebastian Dröge (slomo) 2017-09-28 10:59:48 UTC
commit 5df10fa6f3a5317a2a1649437a143d1d7f9e8afe (HEAD -> master)
Author: Ponnam Srinivas <p.srinivas@samsung.com>
Date:   Thu Sep 28 16:20:53 2017 +0530

    glfilter: Unmap video frame in error case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788194