[0.6.281][adaptive] fix query duration error
[platform/core/multimedia/libmm-player.git] / src / mm_player_gst.c
index c3fb4d0..60efc67 100644 (file)
@@ -933,6 +933,11 @@ __mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
        {
                if (MMPLAYER_USE_DECODEBIN(player))
                        break; /* drop msg */
+               if (message->src == (GstObject *)player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].gst) {
+                       LOGD("pipeline is still under construction for adaptive streaming");
+                       retval = TRUE;
+                       break;
+               }
 
                if ((MMPLAYER_IS_HTTP_STREAMING(player)) &&
                        (!player->pipeline->mainbin[MMPLAYER_M_DEMUXED_S_BUFFER].gst) &&
@@ -2950,6 +2955,12 @@ __mmplayer_gst_select_stream (GstElement * uridecodebin, GstStreamCollection * c
                                goto EXIT;
                        }
                }
+       } else {
+               if ((stype & GST_STREAM_TYPE_AUDIO) || (stype & GST_STREAM_TYPE_VIDEO)) {
+                       LOGD("No caps info, skip it");
+                       ret = 0;
+                       goto EXIT;
+               }
        }
 
        switch (stype) {
@@ -4315,7 +4326,6 @@ _mmplayer_gst_build_pipeline_with_src(mmplayer_t *player)
                goto ERROR;
        }
 
-       /* FIXME: required ?*/
        /* create fakesink element for keeping the pipeline state PAUSED. if needed */
        mainbin[MMPLAYER_M_SRC_FAKESINK].id = MMPLAYER_M_SRC_FAKESINK;
        mainbin[MMPLAYER_M_SRC_FAKESINK].gst = gst_element_factory_make("fakesink", "state-holder");