mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-24 06:56:26 +00:00
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.
This commit is contained in:
parent
4200946cf1
commit
0bd6f374c8
1 changed files with 2 additions and 3 deletions
|
@ -200,14 +200,13 @@ set_fps_from_code (GstMpegVideoSequenceHdr * seqhdr, guint8 fps_code)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @size and @offset are wrt current reader position */
|
/* @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)
|
scan_for_start_codes (const GstByteReader * reader, guint offset, guint size)
|
||||||
{
|
{
|
||||||
const guint8 *data;
|
const guint8 *data;
|
||||||
guint i = 0;
|
guint i = 0;
|
||||||
|
|
||||||
g_return_val_if_fail ((guint64) offset + size <= reader->size - reader->byte,
|
g_assert ((guint64) offset + size <= reader->size - reader->byte);
|
||||||
-1);
|
|
||||||
|
|
||||||
/* we can't find the pattern with less than 4 bytes */
|
/* we can't find the pattern with less than 4 bytes */
|
||||||
if (G_UNLIKELY (size < 4))
|
if (G_UNLIKELY (size < 4))
|
||||||
|
|
Loading…
Reference in a new issue