pngenc: ensure setcaps was called before chain function
This is needed to properly error out for e.g. "fakesrc ! pngenc ! fakesink".
This commit is contained in:
parent
7e390c4635
commit
65f9354803
@ -271,6 +271,11 @@ gst_pngenc_chain (GstPad * pad, GstBuffer * buf)
|
||||
|
||||
GST_DEBUG_OBJECT (pngenc, "BEGINNING");
|
||||
|
||||
if (G_UNLIKELY (pngenc->width <= 0 || pngenc->height <= 0)) {
|
||||
ret = GST_FLOW_NOT_NEGOTIATED;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (GST_BUFFER_SIZE (buf) < pngenc->height * pngenc->stride)) {
|
||||
gst_buffer_unref (buf);
|
||||
GST_ELEMENT_ERROR (pngenc, STREAM, FORMAT, (NULL),
|
||||
|
Loading…
x
Reference in New Issue
Block a user