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 748909 - jpegdec: fix frame leaks
jpegdec: fix frame leaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-04 17:26 UTC by Guillaume Desmottes
Modified: 2015-05-05 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
jpegdec: fix frame leaks in handle_frame() implementation (1.76 KB, patch)
2015-05-05 07:03 UTC, Guillaume Desmottes
none Details | Review
jpegdec: fix frame leaks in handle_frame() implementation (1.78 KB, patch)
2015-05-05 17:13 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2015-05-04 17:26:01 UTC
.
Comment 1 Tim-Philipp Müller 2015-05-04 17:56:27 UTC
missing attachment?
Comment 2 Guillaume Desmottes 2015-05-05 07:03:49 UTC
Created attachment 302911 [details] [review]
jpegdec: fix frame leaks in handle_frame() implementation

handle_frame() is supposed to consume @frame, so if we don't call
gst_video_decoder_drop_frame() or gst_video_decoder_finish_frame() we have to
unref it manually.
Comment 3 Nicolas Dufresne (ndufresne) 2015-05-05 12:39:12 UTC
Review of attachment 302911 [details] [review]:

::: ext/jpeg/gstjpegdec.c
@@ +1154,3 @@
 
+  if (unref_frame)
+    gst_video_codec_frame_unref (frame);

I think the correct call is gst_video_decoder_release_frame(), so it also get removed from the base class internal list. Please verify.
Comment 4 Guillaume Desmottes 2015-05-05 17:12:57 UTC
Yep, looks like you're right.
Comment 5 Guillaume Desmottes 2015-05-05 17:13:12 UTC
Created attachment 302938 [details] [review]
jpegdec: fix frame leaks in handle_frame() implementation

handle_frame() is supposed to consume @frame, so if we don't call
gst_video_decoder_drop_frame() or gst_video_decoder_finish_frame() we have to
release it manually.
Comment 6 Nicolas Dufresne (ndufresne) 2015-05-05 17:55:44 UTC
Review of attachment 302938 [details] [review]:

Looks good.
Comment 7 Nicolas Dufresne (ndufresne) 2015-05-05 18:06:32 UTC
Attachment 302938 [details] pushed as 1421fc5 - jpegdec: fix frame leaks in handle_frame() implementation
Comment 8 Nicolas Dufresne (ndufresne) 2015-05-05 18:06:43 UTC
Review of attachment 302938 [details] [review]:

.