if (!stream_pos->packet_real_index)
goto error;
+ if (stream_pos->packet_real_index->len <= 0)
+ continue;
+
if (type == BT_CLOCK_REAL) {
index = &g_array_index(stream_pos->packet_real_index,
struct packet_index,
if (!stream_pos->packet_real_index)
goto error;
+ if (stream_pos->packet_real_index->len <= 0)
+ continue;
+
if (type == BT_CLOCK_REAL) {
index = &g_array_index(stream_pos->packet_real_index,
struct packet_index,
stream_pos->packet_real_index = g_array_new(FALSE, TRUE,
sizeof(struct packet_index));
+ if (!stream_pos->packet_cycles_index)
+ continue;
+
for (k = 0; k < stream_pos->packet_cycles_index->len; k++) {
struct packet_index *index;
struct packet_index new_index;
}
handle->format = fmt;
handle->td = td;
- strncpy(handle->path, path, PATH_MAX);
- handle->path[PATH_MAX - 1] = '\0';
+ if (path) {
+ strncpy(handle->path, path, PATH_MAX);
+ handle->path[PATH_MAX - 1] = '\0';
+ }
if (fmt->set_handle)
fmt->set_handle(td, handle);