summaryrefslogtreecommitdiff
path: root/gst/videoparsers/gsth263parse.c
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2012-03-10 19:10:52 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2012-03-10 19:22:07 -0300
commit20669d461a4953eb5ed01374d5ab628b4dc73b64 (patch)
tree5647a44580eba66f6b360066f90406f0779f121f /gst/videoparsers/gsth263parse.c
parenta7eda9ed4942e24f0a3971c3591af54cc4cd9a5b (diff)
downloadgstreamer-plugins-bad-20669d461a4953eb5ed01374d5ab628b4dc73b64.tar.gz
Fix 'ignoring return value of function declared with const attribute'
This always happens with GstByteReader/Writer and friends when not taking into account returned boolean of the _read/_write functions (which is actually wrong). Make use of the *_unchecked variant as much as possible, or take the returned value into account.
Diffstat (limited to 'gst/videoparsers/gsth263parse.c')
-rw-r--r--gst/videoparsers/gsth263parse.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c
index 85028c28d..d488d5a68 100644
--- a/gst/videoparsers/gsth263parse.c
+++ b/gst/videoparsers/gsth263parse.c
@@ -65,10 +65,8 @@ gst_h263_parse_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_static_pad_template (gstelement_class,
- &srctemplate);
- gst_element_class_add_static_pad_template (gstelement_class,
- &sinktemplate);
+ gst_element_class_add_static_pad_template (gstelement_class, &srctemplate);
+ gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate);
gst_element_class_set_details_simple (gstelement_class, "H.263 parser",
"Codec/Parser/Video",
"Parses H.263 streams",
@@ -163,7 +161,8 @@ find_psc (GstBuffer * buffer, guint skip)
if (!gst_byte_reader_set_pos (&br, skip))
goto out;
- gst_byte_reader_peek_uint24_be (&br, &psc);
+ if (gst_byte_reader_peek_uint24_be (&br, &psc) == FALSE)
+ goto out;
/* Scan for the picture start code (22 bits - 0x0020) */
while ((gst_byte_reader_get_remaining (&br) >= 3)) {
@@ -171,8 +170,8 @@ find_psc (GstBuffer * buffer, guint skip)
((psc & 0xffffc0) == 0x000080)) {
psc_pos = gst_byte_reader_get_pos (&br);
break;
- } else
- gst_byte_reader_skip (&br, 1);
+ } else if (gst_byte_reader_skip (&br, 1) == FALSE)
+ break;
}
out: