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 747103 - discoverer: leak when handling toc messages
discoverer: leak when handling toc messages
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-31 11:25 UTC by Guillaume Desmottes
Modified: 2015-04-17 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
discoverer: fix GstToc leak when parsing toc messages (1.30 KB, patch)
2015-03-31 11:30 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2015-03-31 11:25:53 UTC
.
Comment 1 Guillaume Desmottes 2015-03-31 11:30:16 UTC
Created attachment 300660 [details] [review]
discoverer: fix GstToc leak when parsing toc messages

gst_message_parse_toc() returns a reffed GstToc which is owned by the
GstDiscovererInfo. But we have to make sure we unref its previous value before
setting the new one.
Comment 2 Thibault Saunier 2015-03-31 13:19:27 UTC
Review of attachment 300660 [details] [review]:

Looks correct but I wonder what we want to do in general when we get several ToC for the same stream.
Comment 3 Tim-Philipp Müller 2015-04-03 11:12:53 UTC
Out of curiosity: with which file did you get multiple TOCs posted on the bus?

Thibault: I think just replacing the previous one should work fine in most cases in a discoverer context.
Comment 4 Guillaume Desmottes 2015-04-08 09:17:18 UTC
(In reply to Tim-Philipp Müller from comment #3)
> Out of curiosity: with which file did you get multiple TOCs posted on the
> bus?

gst-validate-launcher -t validate.file.media_check.Sintel_2010_720p_mkv
Comment 5 Vincent Penquerc'h 2015-04-17 14:01:02 UTC
Seems there's nothing pending here about expected behavior when getting two ToCs so I pushed it:

commit d7d8fc5652ba8f99a90b8a8e17526f45d13e3f21
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Tue Mar 31 13:26:21 2015 +0200

    discoverer: fix GstToc leak when parsing toc messages
    
    gst_message_parse_toc() returns a reffed GstToc which is owned by the
    GstDiscovererInfo. But we have to make sure we unref its previous value before
    setting the new one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747103
Comment 6 Tim-Philipp Müller 2015-04-17 14:07:22 UTC
Yes indeed. I should also add that it's the exact same ToC here (posted once by audio/video sink each).