gst/playback/gstplaybasebin.c: Avoid crash when there are external subtitles (fixes #491722).

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (queue_threshold_reached),
(finish_source):
Avoid crash when there are external subtitles (fixes #491722).
This commit is contained in:
Tim-Philipp Müller 2007-11-06 11:09:30 +00:00
parent 5c279f449a
commit 750a724841
3 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2007-11-06 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gstplaybasebin.c: (queue_threshold_reached),
(finish_source):
Avoid crash when there are external subtitles (fixes #491722).
2007-11-03 Tim-Philipp Müller <tim at centricular dot net>
* ext/alsa/gstalsasink.c: (gst_alsasink_open):

2
common

@ -1 +1 @@
Subproject commit 34d7d649b972ea4915611a6ed88f01613bf32777
Subproject commit 423e2ea96b5f79281f4dd20d734bd968b3d95e89

View file

@ -671,9 +671,15 @@ queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin)
play_base_bin->queue_min_threshold, NULL);
}
GROUP_LOCK (play_base_bin);
group = get_active_group (play_base_bin);
if (!group) {
GROUP_UNLOCK (play_base_bin);
return;
}
/* we remove the probe now because we don't need it anymore to give progress
* about the buffering. */
group = get_active_group (play_base_bin);
for (n = 0; n < NUM_TYPES; n++) {
GstElement *element = group->type[n].preroll;
@ -683,6 +689,8 @@ queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin)
queue_remove_probe (element, play_base_bin);
}
GROUP_UNLOCK (play_base_bin);
/* we post a 100% buffering message to notify the app that buffering is
* completed and playback can start/continue */
if (play_base_bin->is_stream)
@ -2205,6 +2213,7 @@ could_not_link:
static void
finish_source (GstPlayBaseBin * play_base_bin)
{
/* FIXME: no need to grab the group lock here? (tpm) */
if (get_active_group (play_base_bin) != NULL) {
if (play_base_bin->subtitle) {
/* make subs iterate from now on */