aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-25 13:58:10 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-25 13:58:10 +0200
commitaf4f9b805a947b4495961a519af6045cd3f19a33 (patch)
treeb3535292f240533307ad5232a12c5fa9525ed87c /src/main.cpp
parentb7da16a9328285b108f33eb55a5fa33db8791bb7 (diff)
Fix variable shadow warnings
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2845d4c..2c6bced 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1396,18 +1396,18 @@ static void save_replay_async(AVCodecContext *video_codec_context, int video_str
audio_track.stream = audio_stream;
}
- int ret = avio_open(&av_format_context->pb, save_replay_output_filepath.c_str(), AVIO_FLAG_WRITE);
- if (ret < 0) {
- fprintf(stderr, "Error: Could not open '%s': %s. Make sure %s is an existing directory with write access\n", save_replay_output_filepath.c_str(), av_error_to_string(ret), save_replay_output_filepath.c_str());
+ const int open_ret = avio_open(&av_format_context->pb, save_replay_output_filepath.c_str(), AVIO_FLAG_WRITE);
+ if (open_ret < 0) {
+ fprintf(stderr, "Error: Could not open '%s': %s. Make sure %s is an existing directory with write access\n", save_replay_output_filepath.c_str(), av_error_to_string(open_ret), save_replay_output_filepath.c_str());
return;
}
AVDictionary *options = nullptr;
av_dict_set(&options, "strict", "experimental", 0);
- ret = avformat_write_header(av_format_context, &options);
- if (ret < 0) {
- fprintf(stderr, "Error occurred when writing header to output file: %s\n", av_error_to_string(ret));
+ const int header_write_ret = avformat_write_header(av_format_context, &options);
+ if (header_write_ret < 0) {
+ fprintf(stderr, "Error occurred when writing header to output file: %s\n", av_error_to_string(header_write_ret));
avio_close(av_format_context->pb);
avformat_free_context(av_format_context);
av_dict_free(&options);