mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 02:02:26 +00:00
theoraenc: Do nothing when flushing the encoder when no caps were set
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
This commit is contained in:
parent
2b45196042
commit
508245dfa6
1 changed files with 7 additions and 0 deletions
|
@ -364,6 +364,13 @@ theora_enc_flush (GstVideoEncoder * encoder)
|
||||||
ogg_uint32_t keyframe_force;
|
ogg_uint32_t keyframe_force;
|
||||||
int rate_flags;
|
int rate_flags;
|
||||||
|
|
||||||
|
|
||||||
|
if (enc->input_state == NULL) {
|
||||||
|
GST_INFO_OBJECT (enc, "Not configured yet, returning FALSE");
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
GST_OBJECT_LOCK (enc);
|
GST_OBJECT_LOCK (enc);
|
||||||
enc->info.target_bitrate = enc->video_bitrate;
|
enc->info.target_bitrate = enc->video_bitrate;
|
||||||
enc->info.quality = enc->video_quality;
|
enc->info.quality = enc->video_quality;
|
||||||
|
|
Loading…
Reference in a new issue