+
+ int64_t result = 0;
+
+ if (segment_id == currently_processed_segment_)
+ result = samples_decoded_;
+ else
+ if (segment_id < currently_processed_segment_)
+ // Segment was already decoded fully
+ result = get_working_sample_count(segment_id);
+ else
+ // Segment wasn't decoded at all yet
+ result = 0;
+
+ return result;