Skip to content

Commit 49e005f

Browse files
committed
Do not skip over frame backrefs for version-1 and older movies
1 parent 9b4168d commit 49e005f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

input/bsv/bsvmovie.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ bool bsv_movie_read_next_events(bsv_movie_t *handle, bool skip_checkpoints)
536536
{
537537
input_driver_state_t *input_st = input_state_get_ptr();
538538
/* Skip over backref */
539-
intfstream_seek(handle->file, sizeof(uint32_t), SEEK_CUR);
539+
if (handle->version > 1)
540+
intfstream_seek(handle->file, sizeof(uint32_t), SEEK_CUR);
540541
/* Start by reading key event */
541542
if (intfstream_read(handle->file, &(handle->key_event_count), 1) == 1)
542543
{
@@ -831,8 +832,11 @@ bool replay_check_same_timeline(bsv_movie_t *movie, uint8_t *other_movie, int64_
831832
goto exit;
832833
}
833834
/* skip past backref */
834-
intfstream_seek(movie->file, 4, SEEK_CUR);
835-
intfstream_seek(check_stream, 4, SEEK_CUR);
835+
if (movie->version > 1)
836+
{
837+
intfstream_seek(movie->file, sizeof(uint32_t), SEEK_CUR);
838+
intfstream_seek(check_stream, sizeof(uint32_t), SEEK_CUR);
839+
}
836840
if (intfstream_read(movie->file, &keycount1, 1) < 1 ||
837841
intfstream_read(check_stream, &keycount2, 1) < 1 ||
838842
keycount1 != keycount2)

0 commit comments

Comments
 (0)