From: <ms...@fr...> - 2005-11-10 17:30:05
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: msmith Date: Thu Nov 10 2005 09:30:00 PST Log message: * gst/playback/gstplaybasebin.c: (group_commit), (new_decoded_pad), (setup_substreams), (set_active_source): Unlock GROUP_LOCK in failure cases, so that we don't deadlock when trying to go to NULL if we failed to read a file. Modified files: . : ChangeLog gst/playback : gstplaybasebin.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.2057&r2=1.2058 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c.diff?r1=1.88&r2=1.89 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.2057 retrieving revision 1.2058 diff -u -d -r1.2057 -r1.2058 --- ChangeLog 10 Nov 2005 14:58:41 -0000 1.2057 +++ ChangeLog 10 Nov 2005 17:29:48 -0000 1.2058 @@ -1,3 +1,10 @@ +2005-11-10 Michael Smith <ms...@fl...> + + * gst/playback/gstplaybasebin.c: (group_commit), (new_decoded_pad), + (setup_substreams), (set_active_source): + Unlock GROUP_LOCK in failure cases, so that we don't deadlock when + trying to go to NULL if we failed to read a file. + 2005-11-10 Wim Taymans <wi...@fl...> * gst/audiotestsrc/gstaudiotestsrc.c: Index: gstplaybasebin.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- gstplaybasebin.c 20 Oct 2005 10:35:06 -0000 1.88 +++ gstplaybasebin.c 10 Nov 2005 17:29:48 -0000 1.89 @@ -401,8 +401,10 @@ GST_DEBUG ("signaled group done"); if (!subtitle && !had_active_group) { - if (!prepare_output (play_base_bin)) + if (!prepare_output (play_base_bin)) { + GROUP_UNLOCK (play_base_bin); return; + } setup_substreams (play_base_bin); GST_DEBUG ("Emitting signal"); @@ -988,6 +990,9 @@ if (type == GST_STREAM_TYPE_UNKNOWN || group->type[type - 1].npads > 0) { guint id; + GST_DEBUG ("Adding silence_stream data probe on type %d (npads %d)", type, + group->type[type - 1].npads); id = gst_pad_add_data_probe (GST_PAD_CAST (pad), G_CALLBACK (silence_stream), info); g_object_set_data (G_OBJECT (pad), "eat_probe", GINT_TO_POINTER (id)); @@ -1115,7 +1120,7 @@ } } - /* now acticate the right sources. Don't forget that during preroll, + /* now activate the right sources. Don't forget that during preroll, * we set the first source to forwarding and ignored the rest. */ for (n = 0; n < NUM_TYPES; n++) { set_active_source (play_base_bin, n + 1, play_base_bin->current[n]); @@ -1512,19 +1517,25 @@ play_base_bin->current[type - 1] = source_num; group = get_active_group (play_base_bin); - if (!group || !group->type[type - 1].preroll) + if (!group || !group->type[type - 1].preroll) { + GST_LOG ("No active group, or group for type %d has no preroll", type); return; + } for (s = group->streaminfo; s; s = s->next) { GstStreamInfo *info = s->data; if (info->type == type) { if (num == source_num) { + GST_LOG ("Unmuting (if already muted) source %d of type %d", source_num, + type); g_object_set (s->data, "mute", FALSE, NULL); have_active = TRUE; } else { guint id; + GST_LOG_OBJECT (info->object, "Muting source %d of type %d", num, type); id = gst_pad_add_buffer_probe (GST_PAD_CAST (info->object), G_CALLBACK (mute_stream), info); g_object_set_data (G_OBJECT (info), "mute_probe", GINT_TO_POINTER (id)); @@ -1533,6 +1544,7 @@ + GST_LOG ("Muting group type: %d -> %d", type, !have_active); mute_group_type (group, type, !have_active); } |