for (i = 0; i < stream_pos->packet_index->len; i++) {
index = &g_array_index(stream_pos->packet_index,
struct packet_index, i);
- if (index->timestamp_begin >= timestamp ||
- index->timestamp_end <= timestamp)
+ if (index->timestamp_end <= timestamp)
continue;
stream_pos->packet_seek(&stream_pos->parent, i, SEEK_SET);
switch (iter_pos->type) {
case BT_SEEK_RESTORE:
if (!iter_pos->u.restore)
- goto error_arg;
+ return -EINVAL;
heap_free(iter->stream_heap);
ret = heap_init(iter->stream_heap, 0, stream_compare);
case BT_SEEK_TIME:
tc = iter->ctx->tc;
- if (!iter_pos->u.seek_time)
- goto error_arg;
-
heap_free(iter->stream_heap);
ret = heap_init(iter->stream_heap, 0, stream_compare);
if (ret < 0)
return 0;
default:
/* not implemented */
- goto error_arg;
+ return -EINVAL;
}
return 0;
-error_arg:
- ret = -EINVAL;
error:
heap_free(iter->stream_heap);
if (heap_init(iter->stream_heap, 0, stream_compare) < 0) {