Repository navigation
Commit efb048c
committed
FFmpeg decoder plugin: do not reference the exported heif_error_success object (#1854)
Dynamic plugins are compiled with LIBHEIF_EXPORTS, so inside plugin code
LIBHEIF_API expands to __declspec(dllexport) on MSVC. Exported functions
still resolve through the import library's jump thunks, but exported data
has no thunk, and the reference to heif_error_success in the FFmpeg decoder
and in nalu_utils.cc fails to link when the decoder is built as a plugin.
On Linux this went unnoticed because the loader resolves the symbol from
libheif at dlopen time.
Use a file-local success object instead, as the other plugins do.
nalu_utils.cc is compiled into both libheif and the plugin, so it gets its
own local object rather than depending on heif_plugin.h.
Fixes #18541 parent 72a2684 commit efb048c
2 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| |||
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
336 | | - | |
| 341 | + | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
| |||
607 | 612 | | |
608 | 613 | | |
609 | 614 | | |
610 | | - | |
| 615 | + | |
611 | 616 | | |
612 | 617 | | |
613 | 618 | | |
| |||
680 | 685 | | |
681 | 686 | | |
682 | 687 | | |
683 | | - | |
| 688 | + | |
684 | 689 | | |
685 | 690 | | |
686 | 691 | | |
| |||
707 | 712 | | |
708 | 713 | | |
709 | 714 | | |
710 | | - | |
| 715 | + | |
711 | 716 | | |
712 | 717 | | |
713 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | | - | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
0 commit comments