summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2013-01-28 14:12:56 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2013-01-28 14:12:56 +0000
commit4b0c8a07da5f05b8132beac1e240c14424db1913 (patch)
treea157ce4f84ac5bc206bccb23ae636d52e1fc8378 /ext
parent41412f08eca9f1ad727bc8db6b1de599008e47ac (diff)
downloadgstreamer-plugins-base-4b0c8a07da5f05b8132beac1e240c14424db1913.tar.gz
opusenc: fix crash when setting "cbr" property when encoder is not running yet
https://bugzilla.gnome.org/show_bug.cgi?id=692698
Diffstat (limited to 'ext')
-rw-r--r--ext/opus/gstopusenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index d6dfa9d17..9eefe9ca7 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -996,7 +996,8 @@ gst_opus_enc_set_property (GObject * object, guint prop_id,
/* this one has an opposite meaning to the opus ctl... */
g_mutex_lock (&enc->property_lock);
enc->cbr = g_value_get_boolean (value);
- opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (!enc->cbr));
+ if (enc->state)
+ opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (!enc->cbr));
g_mutex_unlock (&enc->property_lock);
break;
case PROP_CONSTRAINED_VBR: