In case we receive a flush event before having our caps set, we will
end up trying to create a theora encoder even though we are not ready.
Avoid that situation making sure we are initialized before accepting to
be flushed.
https://bugzilla.gnome.org/show_bug.cgi?id=709858
ogg_uint32_t keyframe_force;
int rate_flags;
+
+ if (enc->input_state == NULL) {
+ GST_INFO_OBJECT (enc, "Not configured yet, returning FALSE");
+
+ return FALSE;
+ }
+
GST_OBJECT_LOCK (enc);
enc->info.target_bitrate = enc->video_bitrate;
enc->info.quality = enc->video_quality;