summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-13 17:47:14 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-13 17:53:33 +0100
commit0bd6f374c8b527fb0efa25c583af3714cf08cc5b (patch)
tree02b0a644feeda3cce1e6a81431f409a67230ea62
parent4200946cf174052cae8b4676cc2563a0e28fffea (diff)
codecparsers: mpegvideoparse: turn internal consistency check into a g_assert()
We only check input from the API user with g_return_*_if_fail(). Internal sanity checks should use g_assert() instead, which is disabled by default for releases.
-rw-r--r--gst-libs/gst/codecparsers/gstmpegvideoparser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
index 42654eed4..2fd992f24 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c
+++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
@@ -200,14 +200,13 @@ set_fps_from_code (GstMpegVideoSequenceHdr * seqhdr, guint8 fps_code)
}
/* @size and @offset are wrt current reader position */
-static inline guint
+static inline gint
scan_for_start_codes (const GstByteReader * reader, guint offset, guint size)
{
const guint8 *data;
guint i = 0;
- g_return_val_if_fail ((guint64) offset + size <= reader->size - reader->byte,
- -1);
+ g_assert ((guint64) offset + size <= reader->size - reader->byte);
/* we can't find the pattern with less than 4 bytes */
if (G_UNLIKELY (size < 4))