GNOME Bugzilla – Bug 747546
vtenc: "Output state was not configured"
Last modified: 2018-11-03 13:33:41 UTC
gst_vtenc_finish might be called before gst_vtenc_encode_frame ever manages to encode a single frame, i.e. i = 0; while (g_async_queue_length (self->cur_outframes) > 0) { GstVideoCodecFrame *outframe = g_async_queue_try_pop (self->cur_outframes); /* Try to renegotiate once */ if (i == 0) { meta = gst_buffer_get_core_media_meta (outframe->output_buffer); if (!gst_vtenc_negotiate_downstream (self, meta->sample_buf)) { ^^ this code might never run before gst_vtenc_finish In such case, VT's queue will be flushed and gst_video_encoder_finish_frame will be called for every frame, but negotiation will never happen, and therefore: ERROR videoencoder gstvideoencoder.c:2033:GstFlowReturn gst_video_encoder_finish_frame(GstVideoEncoder *, GstVideoCodecFrame *):<vtenc_h264-0> Output state was not configured
This negotiate code is all a bit weird. It should a) override the negotiate vfunc for that, b) always call that if no output state is set. No need to call it all the time if i == 0... and also call it before finish_frame() if no output state was set yet.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/235.