v4l2videoenc: Call stop on object before renegotiation
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 22 Dec 2017 03:56:51 +0000 (22:56 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 8 Jan 2018 22:20:52 +0000 (17:20 -0500)
Otherwise renegotiation fails as we are still streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=791338

sys/v4l2/gstv4l2videoenc.c

index 1783b86..c9a8040 100644 (file)
@@ -321,6 +321,9 @@ gst_v4l2_video_enc_set_format (GstVideoEncoder * encoder,
     if (gst_v4l2_video_enc_finish (encoder) != GST_FLOW_OK)
       return FALSE;
 
+    gst_v4l2_object_stop (self->v4l2output);
+    gst_v4l2_object_stop (self->v4l2capture);
+
     gst_video_codec_state_unref (self->input_state);
     self->input_state = NULL;
   }