fluiddec: don't crash on 0-sized input buffers

https://bugzilla.gnome.org/show_bug.cgi?id=737658
This commit is contained in:
Tim-Philipp Müller 2014-10-01 00:53:59 +01:00
parent cc3ca17f4c
commit 3953b8e419

View file

@ -396,6 +396,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer)
gst_buffer_map (buffer, &info, GST_MAP_READ);
if (info.size == 0)
goto done;
event = info.data[0];
switch (event & 0xf0) {
@ -461,6 +464,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer)
break;
}
}
done:
gst_buffer_unmap (buffer, &info);
}