Make sure the first frame is pts 0

This commit is contained in:
dec05eba
2026-04-21 18:12:41 +02:00
parent 9a6b345bac
commit 1e1da80d74
3 changed files with 22 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ typedef struct {
AVFormatContext *format_context;
AVStream *stream;
int64_t start_pts;
int64_t first_pts;
bool has_received_keyframe;
char *first_frame_ts_filepath;
bool first_frame_ts_written;
@@ -26,6 +27,7 @@ typedef struct {
typedef struct {
gsr_replay_buffer *replay_buffer;
int64_t first_pts;
pthread_mutex_t file_write_mutex;
bool file_write_mutex_created;