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 364388 - size variable is not always initialized in gst_base_src_start()
size variable is not always initialized in gst_base_src_start()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal trivial
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-23 11:42 UTC by Sergey Scobich
Modified: 2006-10-23 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sergey Scobich 2006-10-23 11:42:38 UTC
Hi, it seems that in gstbasesrc.c in gst_base_src_start() the variable size is not always initialized and used later.
It happends when basesrc->segment.format != GST_FORMAT_BYTES for ex GST_FORMAT_TIME in my case.
later size is used here:

/* run typefind if we are random_access and the typefinding is enabled. */
if (basesrc->random_access && basesrc->data.ABI.typefind && size != -1) {

may be it is better to initialize size with -1 from the start.
Comment 1 Wim Taymans 2006-10-23 14:51:36 UTC
        Patch by: Sergey Scobich <sergey dot scobich at gmail dot com>

        * libs/gst/base/gstbasesrc.c: (gst_base_src_wait_playing),
        (gst_base_src_start), (gst_base_src_activate_push):
        Make sure size is always initialized. Fixes #364388.