From: Sebastian Dröge Date: Wed, 8 Sep 2010 05:13:42 +0000 (+0200) Subject: rtpjpegpay: Fix uninitialized variable compiler warning X-Git-Tag: RELEASE-0.10.26~171 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=640cb863d4e06ea0e5291ec28e53247b2ec70b31;p=platform%2Fupstream%2Fgst-plugins-good.git rtpjpegpay: Fix uninitialized variable compiler warning Fixes bug #629018. --- diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c index 7688d2eaf..17fc90af2 100644 --- a/gst/rtp/gstrtpjpegpay.c +++ b/gst/rtp/gstrtpjpegpay.c @@ -375,7 +375,7 @@ gst_rtp_jpeg_pay_read_sof (GstRtpJPEGPay * pay, const guint8 * data, /* we need at least 17 bytes for the SOF */ if (off + 17 > size) - goto wrong_length; + goto wrong_size; sof_size = gst_rtp_jpeg_pay_header_size (data, off); if (sof_size < 17) @@ -448,6 +448,12 @@ gst_rtp_jpeg_pay_read_sof (GstRtpJPEGPay * pay, const guint8 * data, return TRUE; /* ERRORS */ +wrong_size: + { + GST_ELEMENT_ERROR (pay, STREAM, FORMAT, + ("Wrong size %u (needed %u).", size, off + 17), (NULL)); + return FALSE; + } wrong_length: { GST_ELEMENT_ERROR (pay, STREAM, FORMAT,