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 353121 - gst_query_new_segment should initialize all structure fields
gst_query_new_segment should initialize all structure fields
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks: 352753
 
 
Reported: 2006-08-27 18:16 UTC by Torsten Schoenfeld
Modified: 2006-08-28 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initialize all fields (808 bytes, patch)
2006-08-27 18:17 UTC, Torsten Schoenfeld
committed Details | Review

Description Torsten Schoenfeld 2006-08-27 18:16:42 UTC
gst_query_new_segment currently only initializes the format field, but not rate, start_value, and stop_value.  This leads to assertions if you gst_query_parse_segment before you gst_query_set_segment.  Other query constructors also initialize all fields even if their value isn't known yet, for example gst_query_new_position and gst_query_new_duration.

Patch attached.
Comment 1 Torsten Schoenfeld 2006-08-27 18:17:29 UTC
Created attachment 71710 [details] [review]
Initialize all fields
Comment 2 Wim Taymans 2006-08-28 08:45:47 UTC
        Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>

        * gst/gstquery.c: (gst_query_new_segment):
        * tests/check/gst/gstquery.c: (GST_START_TEST):
        Initialize variables when creating a new segment query.
        Fixes #353121.