Commit 457712b9 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

matroska: fix check for amount of data to read

History shows length==0 should set data to NULL and return,
so we do that too instead of trying to read nothing.

Coverity 206205
parent 46a39bdd
......@@ -377,7 +377,7 @@ gst_ebml_read_bytes (GstEbmlRead * ebml, guint32 * id, const guint8 ** data,
return GST_FLOW_ERROR; /* FIXME: do proper error handling */
*data = NULL;
if (G_LIKELY (length >= 0)) {
if (G_LIKELY (length > 0)) {
if (!gst_byte_reader_get_data (gst_ebml_read_br (ebml), length, data))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment