diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-10 21:42:19 +0100 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-10 21:42:19 +0100 |
commit | d607daaf183eb3e068ec53bbf373ea3a63991aa9 (patch) | |
tree | 3f5badc787dec431255858b29fea472fca228f56 /ext | |
parent | 011e9c10f0e01e347a5becb2ba1bcd50cbad167b (diff) | |
download | gst-plugins-bad-d607daaf183eb3e068ec53bbf373ea3a63991aa9.tar.gz gst-plugins-bad-d607daaf183eb3e068ec53bbf373ea3a63991aa9.tar.bz2 gst-plugins-bad-d607daaf183eb3e068ec53bbf373ea3a63991aa9.zip |
mimenc: Only enable paused mode if the property is true
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mimic/gstmimenc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c index 66c74230..84f34012 100644 --- a/ext/mimic/gstmimenc.c +++ b/ext/mimic/gstmimenc.c @@ -559,6 +559,7 @@ gst_mimenc_change_state (GstElement * element, GstStateChange transition) { GstMimEnc *mimenc = GST_MIMENC (element); GstStateChangeReturn ret; + gboolean paused_mode; switch (transition) { case GST_STATE_CHANGE_READY_TO_NULL: @@ -605,10 +606,13 @@ gst_mimenc_change_state (GstElement * element, GstStateChange transition) if (mimenc->last_buffer == GST_CLOCK_TIME_NONE) mimenc->last_buffer = gst_clock_get_time (GST_ELEMENT_CLOCK (mimenc)) - GST_ELEMENT_CAST (mimenc)->base_time; + paused_mode = mimenc->paused_mode; GST_OBJECT_UNLOCK (mimenc); - if (!gst_pad_start_task (mimenc->srcpad, paused_mode_task, mimenc)) { - ret = GST_STATE_CHANGE_FAILURE; - GST_ERROR_OBJECT (mimenc, "Can not start task"); + if (paused_mode) { + if (!gst_pad_start_task (mimenc->srcpad, paused_mode_task, mimenc)) { + ret = GST_STATE_CHANGE_FAILURE; + GST_ERROR_OBJECT (mimenc, "Can not start task"); + } } break; default: |