midiparser: ensure variable is initialized and fix debug message access

This commit is contained in:
Josep Torra 2013-03-30 10:57:08 +01:00
parent 030cf658e6
commit b6719fe0e3

View file

@ -845,6 +845,8 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
{
guint32 type;
*length = 0;
if (size < 8)
goto short_chunk;
@ -908,7 +910,7 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
/* ERRORS */
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;
}
invalid_format: