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 768509 - matroskamux: Segmentation fault in string comparison
matroskamux: Segmentation fault in string comparison
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-07 09:33 UTC by David Fernandez
Modified: 2016-07-25 10:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
matroskamux: Fix segmentation fault (1.57 KB, patch)
2016-07-07 09:33 UTC, David Fernandez
rejected Details | Review

Description David Fernandez 2016-07-07 09:33:00 UTC
Created attachment 330988 [details] [review]
matroskamux: Fix segmentation fault

Hi,

Following this patch [1], I have changed the following string comparisons because the error hasn't dissapeared but it has been moved later.

Best regards.
David.
 
[1]https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=ac3b1cf2ed9fa89a1814dcde133bbd73d597bac7
Comment 1 Sebastian Dröge (slomo) 2016-07-07 10:40:15 UTC
Review of attachment 330988 [details] [review]:

::: gst/matroska/matroska-mux.c
@@ +3569,3 @@
 
+  if (!g_strcmp0 (collect_pad->track->codec_id,
+          GST_MATROSKA_CODEC_ID_AUDIO_OPUS)

Question is why this is NULL in the first place, and why we didn't error out earlier because of that already. We probably should :)

Same goes for the other commit you mentioned.
Comment 2 David Fernandez 2016-07-07 10:48:39 UTC
Good question, but I don't know about the muxer code. Probably there is an error in another part of the code and we need to fix the origin, but in the meanwhile we need a solution because this error is breaking the execution.
Comment 3 Sebastian Dröge (slomo) 2016-07-07 11:00:08 UTC
It seems like hiding only a more severe bug though, let's fix it properly instead.
Comment 4 Sebastian Dröge (slomo) 2016-07-07 11:00:33 UTC
How can you reproduce the crash btw?
Comment 5 David Fernandez 2016-07-07 11:05:48 UTC
I agree with you. I'm sorry, but I don't have way to reproduce the error, it appears once in a while.
Comment 6 Sebastian Dröge (slomo) 2016-07-07 15:27:41 UTC
commit dbb8ec4639f225c57384a876749c27a59f21baf1
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Jul 7 18:23:07 2016 +0300

    matroskamux: Error out if we start writing data with some pads not having a codec id yet
    
    This can only happen if a) upstream somehow gets around the CAPS event failing
    or b) there never being any CAPS event.
    
    The following code assumes that all pads have a codec-id.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768509
Comment 7 David Fernandez 2016-07-08 06:43:38 UTC
Hi Sebastian,

Thanks for your fix.

Regards.