aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-12-20 15:53:02 +0100
committerdec05eba <dec05eba@protonmail.com>2022-12-20 15:53:02 +0100
commitfcb8f24754d837fe5208b7be88ced4719aefd89e (patch)
treef5ae22b788ac7f749103641cd5f52ff358f05588 /src/main.cpp
parent8d30a205b19cbbb3230bb17818e705ffccd81731 (diff)
Merge code fix
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c47089d..bde09b2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1099,25 +1099,6 @@ int main(int argc, char **argv) {
const double target_fps = 1.0 / (double)fps;
- AVFormatContext *av_format_context;
- // The output format is automatically guessed by the file extension
- avformat_alloc_output_context2(&av_format_context, nullptr, container_format, filename);
- if (!av_format_context) {
- fprintf(stderr, "Error: Failed to deduce container format from file extension\n");
- return 1;
- }
-
- av_format_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
- av_format_context->flags |= AVFMT_FLAG_GENPTS;
- const AVOutputFormat *output_format = av_format_context->oformat;
-
- std::string file_extension = output_format->extensions;
- {
- size_t comma_index = file_extension.find(',');
- if(comma_index != std::string::npos)
- file_extension = file_extension.substr(0, comma_index);
- }
-
if(strcmp(codec_to_use, "auto") == 0) {
const AVCodec *h265_codec = find_h265_encoder(gpu_inf.vendor);