From: Gwenole Beauchesne Date: Tue, 25 Nov 2014 10:46:12 +0000 (+0100) Subject: decoder: mpeg4: fix uninitialized variables. X-Git-Tag: accepted/tizen/common/20150107.103226~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e292cbcf964703acab938a9339e4ced07b855bf8;p=platform%2Fupstream%2Fgstreamer-vaapi.git decoder: mpeg4: fix uninitialized variables. Fix gst_vaapi_decoder_mpeg4_parse() to initialize the packet type to GST_MPEG4_USER_DATA so that a parse error would result in skipping that packet. Also fix gst_vaapi_decoder_mpeg4_decode_codec_data() to initialize status to GST_VAAPI_DECODER_STATUS_SUCCESS. Change-Id: I0a6410b87ebbd686d1ed561b0575b14aae08a78f Origin: upstream Bug-Tizen: TC-2113/part --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c index 4f80f7f..2f2620b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c @@ -957,7 +957,7 @@ gst_vaapi_decoder_mpeg4_decode_codec_data(GstVaapiDecoder *base_decoder, { GstVaapiDecoderMpeg4 * const decoder = GST_VAAPI_DECODER_MPEG4_CAST(base_decoder); - GstVaapiDecoderStatus status; + GstVaapiDecoderStatus status = GST_VAAPI_DECODER_STATUS_SUCCESS; guchar *buf; guint pos, buf_size; @@ -1033,6 +1033,7 @@ gst_vaapi_decoder_mpeg4_parse(GstVaapiDecoder *base_decoder, if (!buf) return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA; + packet.type = GST_MPEG4_USER_DATA; if (priv->is_svh) result = gst_h263_parse(&packet, buf, 0, size); else