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 797327 - matroskademux: trackcontext uses uninitialized memory
matroskademux: trackcontext uses uninitialized memory
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-23 14:31 UTC by Johan Bjäreholt
Modified: 2018-10-24 08:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (958 bytes, patch)
2018-10-23 14:31 UTC, Johan Bjäreholt
reviewed Details | Review
patch-all-fields (1.73 KB, patch)
2018-10-24 07:42 UTC, Johan Bjäreholt
none Details | Review
patch-all-fields-fixed (1.73 KB, patch)
2018-10-24 07:45 UTC, Johan Bjäreholt
committed Details | Review

Description Johan Bjäreholt 2018-10-23 14:31:22 UTC
Created attachment 374013 [details] [review]
patch

After interlace_mode was added my pipelines sometimes failed to find a matching pad due to the caps not matching since the matroska pad randomly got interlace_mode set which the sinkpad didn't accept.
Comment 1 Sebastian Dröge (slomo) 2018-10-23 15:14:07 UTC
Review of attachment 374013 [details] [review]:

::: gst/matroska/matroska-ids.c
@@ +59,3 @@
   video_context->fourcc = 0;
   video_context->default_fps = 0.0;
+  video_context->interlace_mode = GST_MATROSKA_INTERLACE_MODE_UNKNOWN;

Makes sense. Did you check if all fields are initialized here now, and also for the audio/subtitle track types?
Comment 2 Johan Bjäreholt 2018-10-24 07:42:48 UTC
Created attachment 374022 [details] [review]
patch-all-fields

Here are all uninitialized values in video, audio and subtitle contexts. Whether these default values are correct though I'm not sure.
Comment 3 Johan Bjäreholt 2018-10-24 07:45:09 UTC
Created attachment 374023 [details] [review]
patch-all-fields-fixed

typo in previous patch, fixed
Comment 4 Sebastian Dröge (slomo) 2018-10-24 08:55:28 UTC
commit abfc7da3453155eccbca79d41603e51ce9199888 (HEAD -> master)
Author: Johan Bjäreholt <johanbj@axis.com>
Date:   Tue Oct 23 13:04:34 2018 +0200

    matroska-ids: Fix uninitialized memory in contexts
    
    https://bugzilla.gnome.org/show_bug.cgi?id=797327