mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
jifmux: Reject buffers without caps
jifmux expects whole jpeg pictures in buffers, so it should reject buffers without caps.
This commit is contained in:
parent
72fdd708cf
commit
a9e4c64efa
1 changed files with 6 additions and 0 deletions
|
@ -586,6 +586,12 @@ gst_jif_mux_chain (GstPad * pad, GstBuffer * buf)
|
|||
guint8 *data = GST_BUFFER_DATA (buf);
|
||||
GstFlowReturn fret = GST_FLOW_OK;
|
||||
|
||||
if (GST_BUFFER_CAPS (buf) == NULL) {
|
||||
GST_WARNING_OBJECT (self, "Rejecting buffer without caps");
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
}
|
||||
|
||||
GST_MEMDUMP ("jpeg beg", data, 64);
|
||||
GST_MEMDUMP ("jpeg end", &data[GST_BUFFER_SIZE (buf) - 64], 64);
|
||||
|
||||
|
|
Loading…
Reference in a new issue