diff --git a/bmf/c_modules/src/ffmpeg_encoder.cpp b/bmf/c_modules/src/ffmpeg_encoder.cpp index c1bb730a..f1cfb314 100644 --- a/bmf/c_modules/src/ffmpeg_encoder.cpp +++ b/bmf/c_modules/src/ffmpeg_encoder.cpp @@ -1478,7 +1478,11 @@ int CFFEncoder::init_codec(int idx, AVFrame *frame) { } } - out_stream->codec->time_base = enc_ctxs_[idx]->time_base; + #ifdef BMF_FFMPEG_VERSION + #if BMF_FFMPEG_VERSION < 50 + out_stream->codec->time_base = enc_ctxs_[idx]->time_base; + #endif + #endif } out_stream->time_base = enc_ctxs_[idx]->time_base; diff --git a/bmf/sdk/cpp_sdk/include/bmf/sdk/filter_graph.h b/bmf/sdk/cpp_sdk/include/bmf/sdk/filter_graph.h index 2bd5cc33..bafadd81 100644 --- a/bmf/sdk/cpp_sdk/include/bmf/sdk/filter_graph.h +++ b/bmf/sdk/cpp_sdk/include/bmf/sdk/filter_graph.h @@ -36,6 +36,7 @@ extern "C" { #include #include #include +#include #include };