diff --git a/ChangeLog b/ChangeLog index 05070b9089..55fee5d32d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-11-06 Tim-Philipp Müller + + * 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 * ext/alsa/gstalsasink.c: (gst_alsasink_open): diff --git a/common b/common index 34d7d649b9..423e2ea96b 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 34d7d649b972ea4915611a6ed88f01613bf32777 +Subproject commit 423e2ea96b5f79281f4dd20d734bd968b3d95e89 diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 5c3a1115e9..cc308ba22d 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -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 */