Skip to content

Commit 02e1bea

Browse files
committed
Rephrasing
1 parent 901080f commit 02e1bea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

smelter-core/src/pipeline/mp4/reader.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<Reader: Read + Seek + Send + 'static> Track<Reader> {
197197
// The STTS box maps samples to batches of the same sample length
198198
let stts = &track.trak.mdia.minf.stbl.stts;
199199

200-
let mut first_batch_sample_id = 1u32;
200+
let mut batch_first_sample_id = 1u32;
201201
let mut elapsed = 0u64;
202202
let mut present_from_index = None;
203203

@@ -207,15 +207,15 @@ impl<Reader: Read + Seek + Send + 'static> Track<Reader> {
207207

208208
if seek_timescale < batch_end_time {
209209
let offset_in_batch = {
210-
let time_into_batch = seek_timescale - elapsed;
211-
time_into_batch.div_ceil(entry.sample_delta as u64) as u32
210+
let batch_seek_timescale = seek_timescale - elapsed;
211+
batch_seek_timescale.div_ceil(entry.sample_delta as u64) as u32
212212
};
213-
present_from_index = Some(first_batch_sample_id + offset_in_batch);
213+
present_from_index = Some(batch_first_sample_id + offset_in_batch);
214214
break;
215215
}
216216

217217
elapsed = batch_end_time;
218-
first_batch_sample_id += entry.sample_count;
218+
batch_first_sample_id += entry.sample_count;
219219
}
220220

221221
let present_from_index = present_from_index?;

0 commit comments

Comments
 (0)