diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-05-16 21:57:52 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-05-16 21:57:55 +0200 |
| commit | b83ee825b8b59a03a94e9bb42dd490500da0e5b4 (patch) | |
| tree | c61cf7132ce12ecacd06ecaeea11299764cbb361 /src/main.cpp | |
| parent | 23703bb590c376b6011b0aadff49b7d7b4414146 (diff) | |
Fix audio/video desync when recording while replaying/streaming
Thanks Reginald Gillespie
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5eae367..c2a5516 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -639,6 +639,7 @@ static void open_video_software(AVCodecContext *codec_context, const args_parser av_dict_set(&options, "preset", "veryfast", 0); av_dict_set(&options, "tune", "film", 0); + av_dict_set_int(&options, "forced-idr", 1, 0); if(codec_context->codec_id == AV_CODEC_ID_H264) { av_dict_set(&options, "coder", "cabac", 0); // TODO: cavlc is faster than cabac but worse compression. Which to use? @@ -746,6 +747,7 @@ static void open_video_hardware(AVCodecContext *codec_context, bool low_power, c // av_dict_set(&options, "tune", "ll", 0); // } av_dict_set(&options, "tune", "ll", 0); + av_dict_set_int(&options, "forced-idr", 1, 0); switch(arg_parser.tune) { case GSR_TUNE_PERFORMANCE: |
