Skip to content
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 build for ffmpeg6 - fix: error: 'AVBSFContext' was not declared #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milahu
Copy link

@milahu milahu commented Jun 4, 2024

the patch is from #186 (comment)

fix: error: 'AVBSFContext' was not declared in this scope; did you mean 'AVIOContext'?

full error
In file included from /build/source/src/audio/../../include/decord/audio_interface.h:9,
                 from /build/source/src/audio/audio_reader.h:10,
                 from /build/source/src/audio/audio_interface.cc:5:
/build/source/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:5: error: 'AVBSFContext' was not declared in this scope; did you mean 'AVIOContext'?
  187 |     AVBSFContext, Deleterp<AVBSFContext, void, av_bsf_free> >;
      |     ^~~~~~~~~~~~
      |     AVIOContext

Copy link

@xman1979 xman1979 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch

@@ -21,6 +21,7 @@
extern "C" {
#endif
#include <libavcodec/avcodec.h>
#include <libavcodec/bsf.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it alphabetical?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that would add diff noise, so it belongs to a separate commit

 #include <libavcodec/avcodec.h>
 #include <libavcodec/bsf.h>
-#include <libavformat/avformat.h>
-#include <libavformat/avio.h>
 #include <libavfilter/avfilter.h>
 #include <libavfilter/buffersink.h>
 #include <libavfilter/buffersrc.h>
+#include <libavformat/avformat.h>
+#include <libavformat/avio.h>
 #include <libavutil/avutil.h>
-#include <libavutil/pixfmt.h>
-#include <libavutil/opt.h>
-#include <libavutil/version.h>
 #include <libavutil/dict.h>
 #include <libavutil/display.h>
 #include <libavutil/file.h>
+#include <libavutil/opt.h>
+#include <libavutil/pixfmt.h>
+#include <libavutil/version.h>
 #include <libswresample/swresample.h>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants