mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
fluiddec: don't crash on 0-sized input buffers
https://bugzilla.gnome.org/show_bug.cgi?id=737658
This commit is contained in:
parent
cc3ca17f4c
commit
3953b8e419
1 changed files with 6 additions and 0 deletions
|
@ -396,6 +396,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer)
|
||||||
|
|
||||||
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
||||||
|
|
||||||
|
if (info.size == 0)
|
||||||
|
goto done;
|
||||||
|
|
||||||
event = info.data[0];
|
event = info.data[0];
|
||||||
|
|
||||||
switch (event & 0xf0) {
|
switch (event & 0xf0) {
|
||||||
|
@ -461,6 +464,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
|
||||||
gst_buffer_unmap (buffer, &info);
|
gst_buffer_unmap (buffer, &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue