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

m4: fix local ffmpeg and avcodec function conflict #18

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

Conversation

giuliobenetti
Copy link

Autotools miss avcodec function check.
This is due to linker library list order, -ldrm is appended too early
respect to -lavutil. This results in missing drm library functions for
avcodec functions:

  • drmGetVersion()
  • drmFreeVersion()
    So these functions:
  • avcodec_get_context_defaults3
  • avcodec_open2
  • avcodec_encode_video2
    can't link correctly during check and they seem not to be present.
    Then macros HAVE_FUN_avcodec_* are not defined in mediastreamer-config.h
    So local avcodec functions conflict with real avcodec library functions.

In acinclude.m4 file, swap $FFMPEG_LIBS and -lavutil if avcodec is found.

Signed-off-by: Giulio Benetti [email protected]

@giuliobenetti
Copy link
Author

This is valid during static linking only

Autotools miss avcodec function check.
This is due to linker library list order, -ldrm is appended too early
respect to -lavutil. This results in missing drm library functions for
avcodec functions:
- drmGetVersion()
- drmFreeVersion()
So these functions:
- avcodec_get_context_defaults3
- avcodec_open2
- avcodec_encode_video2
can't link correctly during check and they seem not to be present.
Then macros HAVE_FUN_avcodec_* are not defined in mediastreamer-config.h
So local avcodec functions conflict with real avcodec library functions.

In acinclude.m4 file, swap $FFMPEG_LIBS and -lavutil if avcodec is found.

Signed-off-by: Giulio Benetti <[email protected]>
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.

1 participant