libs: decoder: h264,h265 avoid uninitialized variable
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 16 Feb 2017 17:11:50 +0000 (18:11 +0100)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 16 Feb 2017 17:46:35 +0000 (18:46 +0100)
commitd6738f3f93ce19b6cd9d072b9a3e31264d9a9d59
treec2950d0806d4ccfc18a41580b2ee0674432fd7ff
parent884e0bece269b5199006690f8f30221aa4d56be3
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.

https://bugzilla.gnome.org/show_bug.cgi?id=778782
gst-libs/gst/vaapi/gstvaapidecoder_h264.c
gst-libs/gst/vaapi/gstvaapidecoder_h265.c