#10299 closed defect (fixed)

avutil should link with libandroid.so when mediacodec enabled on android

Reported by: chinshou Owned by: quinkblack
Priority: normal Component: avutil
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the Bug:

The issue was caused by a specific commit with SHA-1 value 2697f23f4e866a81ddcfca0c99a56ed14f93dc07.

  • avutil/hwcontext_mediacodec: add ANativeWindow support

In this commit, avutil was modified to include support for ANativeWindow, but the configure script did not include the necessary link option (-landroid) to locate the ANativeWindow_release API that exists in libandroid.so.

As a result, when attempting to dlopen libavutil.so on Android, dlerror reported an error indicating that the ANativeWindow_release symbol could not be located.

To fix the problem, the link option -landroid was hardcoded into the Makefile under the libavutil folder. However, a more appropriate solution would be to fix the configure script, although this may require expertise with autotools scripting that I am not familiar with.

Change History (5)

comment:1 by quinkblack, 14 months ago

Status: newopen

comment:2 by quinkblack, 14 months ago

Owner: set to quinkblack

comment:3 by chinshou, 13 months ago

OK, I will update the patch and try again tomorrow.

best regards

in reply to:  1 comment:4 by chinshou, 13 months ago

Replying to quinkblack:

Can you test patch 1/3 and 2/3:

https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=8682

I just checked the two patches without problem. Thanks for the quick fix.

best regards

comment:5 by quinkblack, 13 months ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.