mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
videoencoder: Return not-negotiated if we don't have caps when the first buffer arrives
Otherwise things like filesrc ! jpegenc ! fakesink just crash with a segmentation fault because subclasses expect caps to be there.
This commit is contained in:
parent
6e639b73ff
commit
820d7d7798
1 changed files with 3 additions and 0 deletions
|
@ -1260,6 +1260,9 @@ gst_video_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
encoder->priv->do_caps = FALSE;
|
||||
}
|
||||
|
||||
if (!encoder->priv->input_state)
|
||||
goto not_negotiated;
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
|
||||
pts = GST_BUFFER_PTS (buf);
|
||||
|
|
Loading…
Reference in a new issue