mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
matroska: don't put essential function calls into g_assert()
g_assert() will expand to NOOPs if -DG_DISABLE_ASSERT is passed.
This commit is contained in:
parent
09d19e7dcd
commit
68fa8f3417
1 changed files with 6 additions and 3 deletions
|
@ -262,7 +262,8 @@ gst_ebml_read_master (GstEbmlRead * ebml, guint32 * id)
|
|||
return ret;
|
||||
|
||||
/* we just at least peeked the id */
|
||||
g_assert (gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix));
|
||||
if (!gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix))
|
||||
return GST_FLOW_ERROR; /* FIXME: do proper error handling */
|
||||
|
||||
m.offset = gst_ebml_read_get_pos (ebml);
|
||||
if (!gst_byte_reader_get_data (gst_ebml_read_br (ebml), length, &data))
|
||||
|
@ -329,7 +330,8 @@ gst_ebml_read_buffer (GstEbmlRead * ebml, guint32 * id, GstBuffer ** buf)
|
|||
return ret;
|
||||
|
||||
/* we just at least peeked the id */
|
||||
g_assert (gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix));
|
||||
if (!gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix))
|
||||
return GST_FLOW_ERROR; /* FIXME: do proper error handling */
|
||||
|
||||
if (G_LIKELY (length > 0)) {
|
||||
guint offset;
|
||||
|
@ -367,7 +369,8 @@ gst_ebml_read_bytes (GstEbmlRead * ebml, guint32 * id, const guint8 ** data,
|
|||
return ret;
|
||||
|
||||
/* we just at least peeked the id */
|
||||
g_assert (gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix));
|
||||
if (!gst_byte_reader_skip (gst_ebml_read_br (ebml), prefix))
|
||||
return GST_FLOW_ERROR; /* FIXME: do proper error handling */
|
||||
|
||||
*data = NULL;
|
||||
if (G_LIKELY (length >= 0)) {
|
||||
|
|
Loading…
Reference in a new issue