gst_object_unref(aud_srcpad);
trck = head_track->head;
- while (aud_srcpad != trck->pad && trck != NULL)
+ while (trck != NULL && aud_srcpad != trck->pad)
trck = trck->next;
if (trck != NULL) {
trck->caps = caps;
gst_object_unref(queue_sinkpad);
if (queue_srcpad)
gst_object_unref(queue_srcpad);
- if (type)
- g_free(type);
+ g_free(type);
MEDIADEMUXER_FLEAVE();
return MD_ERROR;
}
MEDIADEMUXER_CHECK_NULL(pHandle);
mdgst_handle_t *gst_handle = (mdgst_handle_t *) pHandle;
- gint64 pos, len;
+ gint64 pos = 0, len = 0;
gdouble rate = 1;
if (gst_element_query_position(gst_handle->pipeline, GST_FORMAT_TIME, &pos) &&
gst_element_query_duration(gst_handle->pipeline, GST_FORMAT_TIME, &len)) {