+ bool b_aseek;
+ access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
+ if( !b_aseek && i_pos < p_current->i_start )
+ {
+ msg_Warn( s, "AStreamSeekStream: can't seek" );
+ return VLC_EGENERIC;
+ }
+
+ bool b_afastseek;
+ access_Control( p_access, ACCESS_CAN_FASTSEEK, &b_afastseek );
+
+ /* FIXME compute seek cost (instead of static 'stupid' value) */
+ uint64_t i_skip_threshold;
+ if( b_aseek )
+ i_skip_threshold = b_afastseek ? 128 : 3*p_sys->stream.i_read_size;
+ else
+ i_skip_threshold = INT64_MAX;
+
+ /* Date the current track */
+ p_current->i_date = mdate();
+
+ /* Search a new track slot */
+ stream_track_t *tk = NULL;
+ int i_tk_idx = -1;