gst/base/gstbasesink.c (gst_basesink_event): Only wait for the clock and post an EOS message if we come out of finish...

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

* gst/base/gstbasesink.c (gst_basesink_event): Only wait for the
clock and post an EOS message if we come out of finish_preroll in
the playing state.
This commit is contained in:
Andy Wingo 2005-06-17 11:33:27 +00:00
parent 85df008efe
commit d47ea57975
4 changed files with 63 additions and 49 deletions

View file

@ -1,3 +1,9 @@
2005-06-17 Andy Wingo <wingo@pobox.com>
* gst/base/gstbasesink.c (gst_basesink_event): Only wait for the
clock and post an EOS message if we come out of finish_preroll in
the playing state.
2005-06-16 David Schleef <ds@schleef.org> 2005-06-16 David Schleef <ds@schleef.org>
* gst/elements/gstcapsfilter.c: (gst_capsfilter_class_init), * gst/elements/gstcapsfilter.c: (gst_capsfilter_class_init),

2
common

@ -1 +1 @@
Subproject commit 495d6e30b3e513aebbc98467707c609c49ea654d Subproject commit d6e46b214fac0ecb46010ff522af2f7653e1c18e

View file

@ -534,13 +534,15 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS: case GST_EVENT_EOS:
{ {
PrerollReturn pre_ret;
gboolean need_eos; gboolean need_eos;
GST_STREAM_LOCK (pad); GST_STREAM_LOCK (pad);
/* EOS also finishes the preroll */ /* EOS also finishes the preroll */
gst_basesink_finish_preroll (basesink, pad, NULL); pre_ret = gst_basesink_finish_preroll (basesink, pad, NULL);
if (pre_ret == PREROLL_PLAYING) {
GST_LOCK (basesink); GST_LOCK (basesink);
need_eos = basesink->eos = TRUE; need_eos = basesink->eos = TRUE;
if (basesink->clock) { if (basesink->clock) {
@ -569,6 +571,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
gst_message_new_eos (GST_OBJECT (basesink))); gst_message_new_eos (GST_OBJECT (basesink)));
} }
} }
}
GST_STREAM_UNLOCK (pad); GST_STREAM_UNLOCK (pad);
break; break;
} }

View file

@ -534,13 +534,15 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS: case GST_EVENT_EOS:
{ {
PrerollReturn pre_ret;
gboolean need_eos; gboolean need_eos;
GST_STREAM_LOCK (pad); GST_STREAM_LOCK (pad);
/* EOS also finishes the preroll */ /* EOS also finishes the preroll */
gst_basesink_finish_preroll (basesink, pad, NULL); pre_ret = gst_basesink_finish_preroll (basesink, pad, NULL);
if (pre_ret == PREROLL_PLAYING) {
GST_LOCK (basesink); GST_LOCK (basesink);
need_eos = basesink->eos = TRUE; need_eos = basesink->eos = TRUE;
if (basesink->clock) { if (basesink->clock) {
@ -569,6 +571,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
gst_message_new_eos (GST_OBJECT (basesink))); gst_message_new_eos (GST_OBJECT (basesink)));
} }
} }
}
GST_STREAM_UNLOCK (pad); GST_STREAM_UNLOCK (pad);
break; break;
} }