*.*: Ran scripts/update-macros. Oh yes.

Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.
This commit is contained in:
Andy Wingo 2005-11-21 16:35:24 +00:00
parent 03ec8f5c05
commit f405e12b4a
10 changed files with 69 additions and 64 deletions

View file

@ -1,3 +1,8 @@
2005-11-21 Andy Wingo <wingo@pobox.com>
* *.h:
* *.c: Ran scripts/update-macros. Oh yes.
2005-11-21 Tim-Philipp Müller <tim at centricular dot net> 2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
* sys/ximage/Makefile.am: * sys/ximage/Makefile.am:

View file

@ -1505,7 +1505,7 @@ gst_ogg_demux_configure_segment (GstOggDemux * ogg, GstEvent * event,
} }
/* store start and stop values */ /* store start and stop values */
GST_LOCK (ogg); GST_OBJECT_LOCK (ogg);
ogg->segment_rate = rate; ogg->segment_rate = rate;
ogg->segment_flags = flags; ogg->segment_flags = flags;
ogg->segment_start = cur; ogg->segment_start = cur;
@ -1518,7 +1518,7 @@ gst_ogg_demux_configure_segment (GstOggDemux * ogg, GstEvent * event,
/* check if we can do the seek now */ /* check if we can do the seek now */
if (running) if (running)
*running = ogg->running; *running = ogg->running;
GST_UNLOCK (ogg); GST_OBJECT_UNLOCK (ogg);
return TRUE; return TRUE;
@ -1576,7 +1576,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg)
* forever. */ * forever. */
GST_STREAM_LOCK (ogg->sinkpad); GST_STREAM_LOCK (ogg->sinkpad);
GST_LOCK (ogg); GST_OBJECT_LOCK (ogg);
/* nothing configured, play complete file */ /* nothing configured, play complete file */
if (ogg->segment_start == GST_CLOCK_TIME_NONE) if (ogg->segment_start == GST_CLOCK_TIME_NONE)
start = 0; start = 0;
@ -1587,7 +1587,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg)
stop = ogg->total_time; stop = ogg->total_time;
else else
stop = CLAMP (ogg->segment_stop, 0, ogg->total_time); stop = CLAMP (ogg->segment_stop, 0, ogg->total_time);
GST_UNLOCK (ogg); GST_OBJECT_UNLOCK (ogg);
/* we need to stop flushing on the srcpad as we're going to use it /* we need to stop flushing on the srcpad as we're going to use it
* next. We can do this as we have the STREAM lock now. */ * next. We can do this as we have the STREAM lock now. */
@ -2400,9 +2400,9 @@ gst_ogg_demux_loop (GstOggPad * pad)
ogg->need_chains = FALSE; ogg->need_chains = FALSE;
GST_LOCK (ogg); GST_OBJECT_LOCK (ogg);
ogg->running = TRUE; ogg->running = TRUE;
GST_UNLOCK (ogg); GST_OBJECT_UNLOCK (ogg);
/* and seek to configured positions without FLUSH */ /* and seek to configured positions without FLUSH */
gst_ogg_demux_perform_seek (ogg); gst_ogg_demux_perform_seek (ogg);
@ -2562,13 +2562,13 @@ gst_ogg_demux_change_state (GstElement * element, GstStateChange transition)
break; break;
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_ogg_demux_clear_chains (ogg); gst_ogg_demux_clear_chains (ogg);
GST_LOCK (ogg); GST_OBJECT_LOCK (ogg);
ogg->running = FALSE; ogg->running = FALSE;
ogg->segment_rate = 1.0; ogg->segment_rate = 1.0;
ogg->segment_flags = GST_SEEK_FLAG_NONE; ogg->segment_flags = GST_SEEK_FLAG_NONE;
ogg->segment_start = GST_CLOCK_TIME_NONE; ogg->segment_start = GST_CLOCK_TIME_NONE;
ogg->segment_stop = GST_CLOCK_TIME_NONE; ogg->segment_stop = GST_CLOCK_TIME_NONE;
GST_UNLOCK (ogg); GST_OBJECT_UNLOCK (ogg);
break; break;
case GST_STATE_CHANGE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
ogg_sync_clear (&ogg->sync); ogg_sync_clear (&ogg->sync);

View file

@ -867,10 +867,10 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
gst_buffer_ref (buf); gst_buffer_ref (buf);
} else { } else {
/* fixme -- should be caught in the previous list traversal. */ /* fixme -- should be caught in the previous list traversal. */
GST_LOCK (pad); GST_OBJECT_LOCK (pad);
g_critical ("No headers or buffers on pad %s:%s", g_critical ("No headers or buffers on pad %s:%s",
GST_DEBUG_PAD_NAME (pad)); GST_DEBUG_PAD_NAME (pad));
GST_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
continue; continue;
} }

View file

@ -579,11 +579,11 @@ theora_dec_src_getcaps (GstPad * pad)
{ {
GstCaps *caps; GstCaps *caps;
GST_LOCK (pad); GST_OBJECT_LOCK (pad);
if (!(caps = GST_PAD_CAPS (pad))) if (!(caps = GST_PAD_CAPS (pad)))
caps = (GstCaps *) gst_pad_get_pad_template_caps (pad); caps = (GstCaps *) gst_pad_get_pad_template_caps (pad);
caps = gst_caps_ref (caps); caps = gst_caps_ref (caps);
GST_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
return caps; return caps;
} }

View file

@ -44,7 +44,7 @@ typedef struct _GstAudioRingBuffer GstAudioRingBuffer;
typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass;
#define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond) #define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond)
#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) #define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
#define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf)))
#define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf)))
@ -190,7 +190,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
/* we wrote one segment */ /* we wrote one segment */
gst_ring_buffer_advance (buf, 1); gst_ring_buffer_advance (buf, 1);
} else { } else {
GST_LOCK (abuf); GST_OBJECT_LOCK (abuf);
if (!abuf->running) if (!abuf->running)
goto stop_running; goto stop_running;
GST_DEBUG ("signal wait"); GST_DEBUG ("signal wait");
@ -201,7 +201,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
if (!abuf->running) if (!abuf->running)
goto stop_running; goto stop_running;
GST_DEBUG ("continue running"); GST_DEBUG ("continue running");
GST_UNLOCK (abuf); GST_OBJECT_UNLOCK (abuf);
} }
} }
GST_DEBUG ("exit thread"); GST_DEBUG ("exit thread");
@ -216,7 +216,7 @@ no_function:
} }
stop_running: stop_running:
{ {
GST_UNLOCK (abuf); GST_OBJECT_UNLOCK (abuf);
GST_DEBUG ("stop running, exit thread"); GST_DEBUG ("stop running, exit thread");
return; return;
} }
@ -346,12 +346,12 @@ gst_audioringbuffer_release (GstRingBuffer * buf)
abuf->running = FALSE; abuf->running = FALSE;
GST_AUDIORING_BUFFER_SIGNAL (buf); GST_AUDIORING_BUFFER_SIGNAL (buf);
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
/* join the thread */ /* join the thread */
g_thread_join (sink->thread); g_thread_join (sink->thread);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
/* free the buffer */ /* free the buffer */
gst_buffer_unref (buf->data); gst_buffer_unref (buf->data);

View file

@ -44,7 +44,7 @@ typedef struct _GstAudioRingBuffer GstAudioRingBuffer;
typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass;
#define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond) #define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond)
#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) #define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
#define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf)))
#define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf)))
@ -186,7 +186,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
/* we read one segment */ /* we read one segment */
gst_ring_buffer_advance (buf, 1); gst_ring_buffer_advance (buf, 1);
} else { } else {
GST_LOCK (abuf); GST_OBJECT_LOCK (abuf);
if (!abuf->running) if (!abuf->running)
goto stop_running; goto stop_running;
GST_DEBUG ("signal wait"); GST_DEBUG ("signal wait");
@ -197,7 +197,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
if (!abuf->running) if (!abuf->running)
goto stop_running; goto stop_running;
GST_DEBUG ("continue running"); GST_DEBUG ("continue running");
GST_UNLOCK (abuf); GST_OBJECT_UNLOCK (abuf);
} }
} }
GST_DEBUG ("exit thread"); GST_DEBUG ("exit thread");
@ -212,7 +212,7 @@ no_function:
} }
stop_running: stop_running:
{ {
GST_UNLOCK (abuf); GST_OBJECT_UNLOCK (abuf);
GST_DEBUG ("stop running, exit thread"); GST_DEBUG ("stop running, exit thread");
return; return;
} }
@ -342,12 +342,12 @@ gst_audioringbuffer_release (GstRingBuffer * buf)
abuf->running = FALSE; abuf->running = FALSE;
GST_AUDIORING_BUFFER_SIGNAL (buf); GST_AUDIORING_BUFFER_SIGNAL (buf);
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
/* join the thread */ /* join the thread */
g_thread_join (src->thread); g_thread_join (src->thread);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
/* free the buffer */ /* free the buffer */
gst_buffer_unref (buf->data); gst_buffer_unref (buf->data);

View file

@ -325,10 +325,10 @@ gst_ring_buffer_set_callback (GstRingBuffer * buf, GstRingBufferCallback cb,
{ {
g_return_if_fail (buf != NULL); g_return_if_fail (buf != NULL);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
buf->callback = cb; buf->callback = cb;
buf->cb_data = user_data; buf->cb_data = user_data;
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
} }
@ -354,7 +354,7 @@ gst_ring_buffer_open_device (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "opening device"); GST_DEBUG_OBJECT (buf, "opening device");
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->open) { if (buf->open) {
g_warning ("Device for ring buffer %p already open, fix your code", buf); g_warning ("Device for ring buffer %p already open, fix your code", buf);
res = TRUE; res = TRUE;
@ -377,7 +377,7 @@ gst_ring_buffer_open_device (GstRingBuffer * buf)
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -403,7 +403,7 @@ gst_ring_buffer_close_device (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "closing device"); GST_DEBUG_OBJECT (buf, "closing device");
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (!buf->open) { if (!buf->open) {
g_warning ("Device for ring buffer %p already closed, fix your code", buf); g_warning ("Device for ring buffer %p already closed, fix your code", buf);
res = TRUE; res = TRUE;
@ -430,7 +430,7 @@ gst_ring_buffer_close_device (GstRingBuffer * buf)
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -452,11 +452,11 @@ gst_ring_buffer_device_is_open (GstRingBuffer * buf)
g_return_val_if_fail (GST_IS_RING_BUFFER (buf), FALSE); g_return_val_if_fail (GST_IS_RING_BUFFER (buf), FALSE);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
res = buf->open; res = buf->open;
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -485,7 +485,7 @@ gst_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
GST_DEBUG_OBJECT (buf, "acquiring device"); GST_DEBUG_OBJECT (buf, "acquiring device");
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (!buf->open) { if (!buf->open) {
g_critical ("Device for %p not opened", buf); g_critical ("Device for %p not opened", buf);
res = FALSE; res = FALSE;
@ -527,7 +527,7 @@ gst_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
} }
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -554,7 +554,7 @@ gst_ring_buffer_release (GstRingBuffer * buf)
gst_ring_buffer_stop (buf); gst_ring_buffer_stop (buf);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (!buf->acquired) { if (!buf->acquired) {
res = TRUE; res = TRUE;
GST_DEBUG_OBJECT (buf, "device was released"); GST_DEBUG_OBJECT (buf, "device was released");
@ -582,7 +582,7 @@ gst_ring_buffer_release (GstRingBuffer * buf)
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -604,9 +604,9 @@ gst_ring_buffer_is_acquired (GstRingBuffer * buf)
g_return_val_if_fail (buf != NULL, FALSE); g_return_val_if_fail (buf != NULL, FALSE);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
res = buf->acquired; res = buf->acquired;
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -622,7 +622,7 @@ gst_ring_buffer_is_acquired (GstRingBuffer * buf)
void void
gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing) gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing)
{ {
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
buf->flushing = flushing; buf->flushing = flushing;
gst_ring_buffer_clear_all (buf); gst_ring_buffer_clear_all (buf);
@ -630,7 +630,7 @@ gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing)
gst_ring_buffer_pause_unlocked (buf); gst_ring_buffer_pause_unlocked (buf);
} }
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
} }
@ -655,7 +655,7 @@ gst_ring_buffer_start (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "starting ringbuffer"); GST_DEBUG_OBJECT (buf, "starting ringbuffer");
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->flushing)
goto flushing; goto flushing;
@ -694,13 +694,13 @@ gst_ring_buffer_start (GstRingBuffer * buf)
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
flushing: flushing:
{ {
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return FALSE; return FALSE;
} }
} }
@ -759,19 +759,19 @@ gst_ring_buffer_pause (GstRingBuffer * buf)
g_return_val_if_fail (buf != NULL, FALSE); g_return_val_if_fail (buf != NULL, FALSE);
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->flushing)
goto flushing; goto flushing;
res = gst_ring_buffer_pause_unlocked (buf); res = gst_ring_buffer_pause_unlocked (buf);
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
flushing: flushing:
{ {
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return FALSE; return FALSE;
} }
} }
@ -796,7 +796,7 @@ gst_ring_buffer_stop (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "stopping"); GST_DEBUG_OBJECT (buf, "stopping");
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
/* if started, set to stopped */ /* if started, set to stopped */
res = g_atomic_int_compare_and_exchange (&buf->state, res = g_atomic_int_compare_and_exchange (&buf->state,
@ -823,7 +823,7 @@ gst_ring_buffer_stop (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "stopped"); GST_DEBUG_OBJECT (buf, "stopped");
} }
done: done:
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return res; return res;
} }
@ -969,7 +969,7 @@ wait_segment (GstRingBuffer * buf)
} }
/* take lock first, then update our waiting flag */ /* take lock first, then update our waiting flag */
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->flushing)
goto flushing; goto flushing;
@ -985,20 +985,20 @@ wait_segment (GstRingBuffer * buf)
if (g_atomic_int_get (&buf->state) != GST_RING_BUFFER_STATE_STARTED) if (g_atomic_int_get (&buf->state) != GST_RING_BUFFER_STATE_STARTED)
goto not_started; goto not_started;
} }
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
return TRUE; return TRUE;
/* ERROR */ /* ERROR */
not_started: not_started:
{ {
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
GST_DEBUG ("stopped processing"); GST_DEBUG ("stopped processing");
return FALSE; return FALSE;
} }
flushing: flushing:
{ {
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
GST_DEBUG ("flushing"); GST_DEBUG ("flushing");
return FALSE; return FALSE;
} }
@ -1286,10 +1286,10 @@ gst_ring_buffer_advance (GstRingBuffer * buf, guint advance)
* we grab the lock as well to make sure the waiter is actually * we grab the lock as well to make sure the waiter is actually
* waiting for the signal */ * waiting for the signal */
if (g_atomic_int_compare_and_exchange (&buf->waiting, 1, 0)) { if (g_atomic_int_compare_and_exchange (&buf->waiting, 1, 0)) {
GST_LOCK (buf); GST_OBJECT_LOCK (buf);
GST_DEBUG ("signal waiter"); GST_DEBUG ("signal waiter");
GST_RING_BUFFER_SIGNAL (buf); GST_RING_BUFFER_SIGNAL (buf);
GST_UNLOCK (buf); GST_OBJECT_UNLOCK (buf);
} }
} }

View file

@ -145,7 +145,7 @@ struct _GstRingBufferSpec
}; };
#define GST_RING_BUFFER_GET_COND(buf) (((GstRingBuffer *)buf)->cond) #define GST_RING_BUFFER_GET_COND(buf) (((GstRingBuffer *)buf)->cond)
#define GST_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_RING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) #define GST_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
#define GST_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_RING_BUFFER_GET_COND (buf))) #define GST_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_RING_BUFFER_GET_COND (buf)))
#define GST_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf))) #define GST_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf)))

View file

@ -132,7 +132,7 @@ MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32)
adder = GST_ADDER (GST_PAD_PARENT (pad)); adder = GST_ADDER (GST_PAD_PARENT (pad));
/* see if the other pads can accept the format */ /* see if the other pads can accept the format */
GST_LOCK (adder); GST_OBJECT_LOCK (adder);
pads = GST_ELEMENT (adder)->pads; pads = GST_ELEMENT (adder)->pads;
while (pads) { while (pads) {
GstPad *otherpad = GST_PAD (pads->data); GstPad *otherpad = GST_PAD (pads->data);
@ -142,7 +142,7 @@ MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32)
} }
pads = g_list_next (pads); pads = g_list_next (pads);
} }
GST_UNLOCK (adder); GST_OBJECT_UNLOCK (adder);
/* parse caps now */ /* parse caps now */
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);

View file

@ -856,10 +856,10 @@ new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic)
GstDecodeBin *decode_bin = dynamic->decode_bin; GstDecodeBin *decode_bin = dynamic->decode_bin;
GstCaps *caps; GstCaps *caps;
GST_LOCK (decode_bin); GST_OBJECT_LOCK (decode_bin);
if (decode_bin->shutting_down) if (decode_bin->shutting_down)
goto shutting_down1; goto shutting_down1;
GST_UNLOCK (decode_bin); GST_OBJECT_UNLOCK (decode_bin);
GST_STATE_LOCK (decode_bin); GST_STATE_LOCK (decode_bin);
if (decode_bin->shutting_down) if (decode_bin->shutting_down)
@ -877,7 +877,7 @@ new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic)
return; return;
shutting_down1: shutting_down1:
GST_UNLOCK (decode_bin); GST_OBJECT_UNLOCK (decode_bin);
return; return;
shutting_down2: shutting_down2:
@ -1173,17 +1173,17 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
decode_bin->dynamics = NULL; decode_bin->dynamics = NULL;
break; break;
case GST_STATE_CHANGE_READY_TO_PAUSED: case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_LOCK (decode_bin); GST_OBJECT_LOCK (decode_bin);
decode_bin->shutting_down = FALSE; decode_bin->shutting_down = FALSE;
GST_UNLOCK (decode_bin); GST_OBJECT_UNLOCK (decode_bin);
break; break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
case GST_STATE_CHANGE_PLAYING_TO_PAUSED: case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break; break;
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_LOCK (decode_bin); GST_OBJECT_LOCK (decode_bin);
decode_bin->shutting_down = TRUE; decode_bin->shutting_down = TRUE;
GST_UNLOCK (decode_bin); GST_OBJECT_UNLOCK (decode_bin);
break; break;
default: default:
break; break;