-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix the incompatibility issue of ffmpeg 5.0 and 5.1 #136
base: master
Are you sure you want to change the base?
Conversation
@@ -36,6 +36,7 @@ extern "C" { | |||
#include <libavutil/bprint.h> | |||
#include <libswscale/swscale.h> | |||
#include <libavutil/opt.h> | |||
#include <libavutil/channel_layout.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
av_get_default_channel_layout
was declared in <libavutil/channel_layout.h>
when the ffmpeg version is 5.x.x, the ffmpeg header file used by BMF does not include <libavutil/channel_layout.h>
and when the ffmpeg version is 4.x.x, there is no such problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no problem for me using 5.1.2 without this header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try other version. like 5.0.3 or 5.1.6
@@ -1478,7 +1478,11 @@ int CFFEncoder::init_codec(int idx, AVFrame *frame) { | |||
} | |||
} | |||
|
|||
out_stream->codec->time_base = enc_ctxs_[idx]->time_base; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line of code is not used, can it be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is for future consideration, waiting for maintainer's opinion~
This PR aim to fix #131 issue that
‘av_get_default_channel_layout’ was not declared
and‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
if we compile bmf with ffmpeg 5.x.xKey change
The following is the compilation error log