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 778782 - check for uninitialized variables
check for uninitialized variables
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other All
: Normal normal
: 1.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-16 17:46 UTC by Víctor Manuel Jáquez Leal
Modified: 2017-02-22 04:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libs: decoder: h264,h265 avoid uninitialized variable (3.46 KB, patch)
2017-02-16 17:46 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: encoder: h265: bail if nal unit type fails (1.11 KB, patch)
2017-02-17 00:21 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2017-02-16 17:46:33 UTC
Josep Torra mentioned me he is getting some compiler complains regarding 
this.

Though I cannot replicate them in my setup, it looks like the code can
be enhanced a little bit there.
Comment 1 Víctor Manuel Jáquez Leal 2017-02-16 17:46:35 UTC
Created attachment 345981 [details] [review]
libs: decoder: h264,h265 avoid uninitialized variable

Configuring GCC to verify possible usage of uninitialized variables,
shows that found_index might be used without previous assignation.

This patch assigns a initial value to found_index, also avoid a
branching when returning the result value.
Comment 2 Víctor Manuel Jáquez Leal 2017-02-17 00:21:35 UTC
Created attachment 346027 [details] [review]
libs: encoder: h265: bail if nal unit type fails

Bail out if the NAL unit type is not recognized.
Comment 3 Josep Torra Valles 2017-02-17 22:01:14 UTC
Both looks good to me and solve all the building issues I was having.

Ship it :) and thanks for looking into them.
Comment 4 Víctor Manuel Jáquez Leal 2017-02-22 04:26:54 UTC
Attachment 345981 [details] pushed as d6738f3 - libs: decoder: h264,h265 avoid uninitialized variable
Attachment 346027 [details] pushed as 7b3a51f - libs: encoder: h265: bail if nal unit type fails