gst/playback/gstdecodebin.c: When there is only one unfinished pad and it receives an event that doesn't match our re...

Original commit message from CVS:
* gst/playback/gstdecodebin.c: (remove_fakesink), (pad_probe):
When there is only one unfinished pad and it receives an event that
doesn't match our requirements, we need to set alldone=FALSE so that
the fakesink is not removed yet.
This commit is contained in:
Jan Schmidt 2006-05-25 16:50:17 +00:00
parent ccafc14742
commit 0d9b638931
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2006-05-25 Jan Schmidt <thaytan@mad.scientist.com>
* gst/playback/gstdecodebin.c: (remove_fakesink), (pad_probe):
When there is only one unfinished pad and it receives an event that
doesn't match our requirements, we need to set alldone=FALSE so that
the fakesink is not removed yet.
2006-05-25 Tim-Philipp Müller <tim at centricular dot net>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):

View file

@ -495,6 +495,7 @@ static void
remove_fakesink (GstDecodeBin * decode_bin)
{
if (decode_bin->fakesink) {
GST_DEBUG_OBJECT (decode_bin, "Removing fakesink and marking state dirty");
gst_object_ref (decode_bin->fakesink);
gst_bin_remove (GST_BIN (decode_bin), decode_bin->fakesink);
@ -534,9 +535,14 @@ pad_probe (GstPad * pad, GstMiniObject * data, GstDecodeBin * decode_bin)
decode_bin->numwaiting--;
pdata->done = TRUE;
}
} else if (!(pdata->done))
}
if (!(pdata->done)) {
GST_LOG_OBJECT (decode_bin, "Pad probe on pad %" GST_PTR_FORMAT
" but pad %" GST_PTR_FORMAT " still needs data.", pad, pdata->pad);
alldone = FALSE;
}
}
if (alldone)
remove_fakesink (decode_bin);
return TRUE;