diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-01-20 17:04:38 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-01-20 17:04:38 +0000 |
commit | a017143695a98c99002d596efe0b6d55896179ba (patch) | |
tree | c3288508b883bb6adadf1f697850fd7a3f759898 | |
parent | 5e2f8a3736ddbafbd81ebe93e9c36b17caf1a5c9 (diff) | |
download | gst-plugins-bad-a017143695a98c99002d596efe0b6d55896179ba.tar.gz gst-plugins-bad-a017143695a98c99002d596efe0b6d55896179ba.tar.bz2 gst-plugins-bad-a017143695a98c99002d596efe0b6d55896179ba.zip |
Fixed state transictions PLAYING->NULL->PLAYING.
Original commit message from CVS:
Fixed state transictions PLAYING->NULL->PLAYING.
-rw-r--r-- | ChangeLog | 6 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | ext/ivorbis/vorbisfile.c | 32 | ||||
-rw-r--r-- | ext/neon/gstneonhttpsrc.c | 2 |
4 files changed, 32 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2006-01-20 Edgard Lima <edgard.lima@indt.org.br> + + * ext/ivorbis/vorbisfile.c: + * ext/neon/gstneonhttpsrc.c: + Fixed state transictions PLAYING->NULL->PLAYING. + 2006-01-19 Edgard Lima <edgard.lima@indt.org.br> * ext/tremor/vorbisfile.c: diff --git a/common b/common -Subproject e0b121388ece524c0b7035a72bddd191d122d8b +Subproject 5d64704708b8ec2bff66d095269dd5791f7a94b diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c index 2de32157..0268b8c3 100644 --- a/ext/ivorbis/vorbisfile.c +++ b/ext/ivorbis/vorbisfile.c @@ -145,6 +145,7 @@ static gboolean gst_ivorbisfile_sink_activate_pull (GstPad * sinkpad, gboolean active); static void gst_ivorbisfile_loop (GstPad * pad); +static GstFlowReturn gst_ivorbisfile_play (GstPad * pad); static GstElementClass *parent_class = NULL; @@ -288,6 +289,13 @@ gst_ivorbisfile_init (Ivorbisfile * ivorbisfile) ivorbisfile->adapter = NULL; + if (ivorbisfile->metadata) { + ivorbisfile->metadata = NULL; + } + if (ivorbisfile->streaminfo) { + ivorbisfile->streaminfo = NULL; + } + } @@ -621,9 +629,7 @@ gst_ivorbisfile_chain (GstPad * pad, GstBuffer * buffer) gst_adapter_push (ivorbisfile->adapter, buffer); - gst_ivorbisfile_loop (pad); - - return GST_FLOW_OK; + return gst_ivorbisfile_play (pad); } @@ -631,12 +637,19 @@ gst_ivorbisfile_chain (GstPad * pad, GstBuffer * buffer) static void gst_ivorbisfile_loop (GstPad * pad) { + gst_ivorbisfile_play (pad); +} + +static GstFlowReturn +gst_ivorbisfile_play (GstPad * pad) +{ Ivorbisfile *ivorbisfile = GST_IVORBISFILE (gst_pad_get_parent (pad)); GstBuffer *outbuf; long ret; GstClockTime time; gint64 samples; gint link; + GstFlowReturn res = GST_FLOW_OK; if (ivorbisfile->eos) { goto done; @@ -803,7 +816,7 @@ gst_ivorbisfile_loop (GstPad * pad) ivorbisfile->total_bytes += GST_BUFFER_SIZE (outbuf); } - if (GST_FLOW_OK != gst_pad_push (ivorbisfile->srcpad, outbuf)) { + if (GST_FLOW_OK != (res = gst_pad_push (ivorbisfile->srcpad, outbuf))) { goto done; } @@ -814,6 +827,7 @@ gst_ivorbisfile_loop (GstPad * pad) done: gst_object_unref (ivorbisfile); + return res; } @@ -1309,8 +1323,14 @@ gst_ivorbisfile_change_state (GstElement * element, GstStateChange transition) ivorbisfile->offset = 0; ivorbisfile->seek_pending = 0; ivorbisfile->need_discont = FALSE; - ivorbisfile->metadata = NULL; - ivorbisfile->streaminfo = NULL; + if (ivorbisfile->metadata) { + gst_caps_unref (ivorbisfile->metadata); + ivorbisfile->metadata = NULL; + } + if (ivorbisfile->streaminfo) { + gst_caps_unref (ivorbisfile->streaminfo); + ivorbisfile->streaminfo = NULL; + } ivorbisfile->current_link = -1; ivorbisfile->rate = -1; diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c index a7c8a192..6c0f2b0e 100644 --- a/ext/neon/gstneonhttpsrc.c +++ b/ext/neon/gstneonhttpsrc.c @@ -377,8 +377,6 @@ gst_neonhttp_src_unlock (GstBaseSrc * bsrc) GST_OBJECT_FLAG_UNSET (src, GST_NEONHTTP_SRC_OPEN); - ne_end_request (src->request); - return TRUE; } |