playbin2: forward duration query duration during group switch if no cached duration

... such as during first group setup.

Fixes #616396.
This commit is contained in:
Mark Nauwelaerts 2010-04-30 13:36:59 +02:00
parent e23d6bbda7
commit db4ccd8610

View file

@ -2072,11 +2072,15 @@ gst_play_bin_query (GstElement * element, GstQuery * query)
break;
}
}
GST_DEBUG_OBJECT (playbin,
"Taking cached duration because of pending group switch: %d", ret);
GST_SOURCE_GROUP_UNLOCK (group);
GST_PLAY_BIN_UNLOCK (playbin);
return ret;
/* if nothing cached yet, we might as well request duration,
* such as during initial startup */
if (ret) {
GST_DEBUG_OBJECT (playbin,
"Taking cached duration because of pending group switch: %d", ret);
GST_SOURCE_GROUP_UNLOCK (group);
GST_PLAY_BIN_UNLOCK (playbin);
return ret;
}
}
GST_SOURCE_GROUP_UNLOCK (group);
}