Skip to content

Commit

Permalink
fix the incompatibility issue of ffmpeg 5.0 and 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLau1222 committed Oct 20, 2024
1 parent a399ed6 commit f171268
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bmf/c_modules/src/ffmpeg_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,11 @@ int CFFEncoder::init_codec(int idx, AVFrame *frame) {
}
}

out_stream->codec->time_base = enc_ctxs_[idx]->time_base;
/**
* @deprecated codec has been deprecated since ffmpeg 5.0
* use out_stream->time_base instead of out_stream->codec->time_base.
*/
out_stream->time_base = enc_ctxs_[idx]->time_base;
}

out_stream->time_base = enc_ctxs_[idx]->time_base;
Expand Down
1 change: 1 addition & 0 deletions bmf/sdk/cpp_sdk/include/bmf/sdk/filter_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extern "C" {
#include <libavutil/bprint.h>
#include <libswscale/swscale.h>
#include <libavutil/opt.h>
#include <libavutil/channel_layout.h>
#include <libavutil/error.h>
};

Expand Down

0 comments on commit f171268

Please sign in to comment.