mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
midiparser: ensure variable is initialized and fix debug message access
This commit is contained in:
parent
030cf658e6
commit
b6719fe0e3
1 changed files with 3 additions and 1 deletions
|
@ -845,6 +845,8 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
|
||||||
{
|
{
|
||||||
guint32 type;
|
guint32 type;
|
||||||
|
|
||||||
|
*length = 0;
|
||||||
|
|
||||||
if (size < 8)
|
if (size < 8)
|
||||||
goto short_chunk;
|
goto short_chunk;
|
||||||
|
|
||||||
|
@ -908,7 +910,7 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
short_chunk:
|
short_chunk:
|
||||||
{
|
{
|
||||||
GST_LOG_OBJECT (midiparse, "not enough data %u < %u", length + 8, size);
|
GST_LOG_OBJECT (midiparse, "not enough data %u < %u", *length + 8, size);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
invalid_format:
|
invalid_format:
|
||||||
|
|
Loading…
Reference in a new issue