summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/play/play.old.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/play/play.old.c')
-rw-r--r--gst-libs/gst/play/play.old.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c
index dd322896..895c530f 100644
--- a/gst-libs/gst/play/play.old.c
+++ b/gst-libs/gst/play/play.old.c
@@ -214,12 +214,14 @@ gst_play_get_length_callback (GstPlay *play)
gboolean query_worked = FALSE;
g_print("trying to get length\n");
- if (play->audio_sink_element != NULL){
+ if ( (play->audio_sink_element != NULL) &&
+ (GST_IS_ELEMENT (play->audio_sink_element)) ) {
g_mutex_lock(play->audio_bin_mutex);
query_worked = gst_element_query (play->audio_sink_element, GST_QUERY_TOTAL, &format, &value);
g_mutex_unlock(play->audio_bin_mutex);
}
- else if (play->video_sink_element != NULL){
+ else if ( (play->video_sink_element != NULL) &&
+ (GST_IS_ELEMENT (play->video_sink_element)) ) {
g_mutex_lock(play->video_bin_mutex);
query_worked = gst_element_query (play->video_sink_element, GST_QUERY_TOTAL, &format, &value);
g_mutex_unlock(play->video_bin_mutex);