Skip to content

Commit

Permalink
flush codec buffers after seeking
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Dec 12, 2024
1 parent c1ae9ea commit a2208a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/replay/framereader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ bool VideoDecoder::decode(FrameReader *reader, int idx, VisionBuf *buf) {
}
}
avio_seek(reader->input_ctx->pb, reader->packets_info[from_idx].pos, SEEK_SET);
avcodec_flush_buffers(decoder_ctx);
}
reader->prev_idx = idx;

Expand Down

0 comments on commit a2208a7

Please sign in to comment.