mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
theoraenc: refuse to get to READY if the encoder was disabled
https://bugzilla.gnome.org/show_bug.cgi?id=663391
This commit is contained in:
parent
353153d079
commit
10811d63f9
1 changed files with 8 additions and 0 deletions
|
@ -1405,11 +1405,19 @@ theora_enc_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
GstTheoraEnc *enc;
|
GstTheoraEnc *enc;
|
||||||
GstStateChangeReturn ret;
|
GstStateChangeReturn ret;
|
||||||
|
th_enc_ctx *th_ctx;
|
||||||
|
|
||||||
enc = GST_THEORA_ENC (element);
|
enc = GST_THEORA_ENC (element);
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
|
th_ctx = dummy_encode_ctx ();
|
||||||
|
if (!th_ctx) {
|
||||||
|
GST_ELEMENT_ERROR (enc, STREAM, ENCODE, (NULL),
|
||||||
|
("libtheora has been compiled with the encoder disabled"));
|
||||||
|
return GST_STATE_CHANGE_FAILURE;
|
||||||
|
}
|
||||||
|
th_encode_free (th_ctx);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
GST_DEBUG_OBJECT (enc, "READY->PAUSED Initing theora state");
|
GST_DEBUG_OBJECT (enc, "READY->PAUSED Initing theora state");
|
||||||
|
|
Loading…
Reference in a new issue