[OpenWrt-Devel] [packages] libdlna: fix build with ffmpeg 2.4.2

Dirk Neukirchen dirkneukirchen at web.de
Sun Nov 16 05:47:01 EST 2014


On 16.11.2014 09:45, Robert P. J. Day wrote:
> 
>   i checked trac and it seems that there is (still?) an ongoing issue
> with building libdlna, as i was trying to do for a tp-link archer c7
> v2:
> 
> cc1: note: someone does not honour COPTS correctly, passed 2 times
> src/libdlna.so: undefined reference to `av_find_stream_info'
> src/libdlna.so: undefined reference to `av_close_input_file'
> collect2: error: ld returned 1 exit status
> Makefile:36: recipe for target 'test-libdlna' failed
> make[4]: *** [test-libdlna] Error 1
> 
>   that seems to match what i see here:
> 
> https://dev.openwrt.org/ticket/11666
> 
> is there a suggested fix for this? or i can just deselect it for now.
> 
> rday
> 

only compile tested

fixes error:
src/libdlna.so: undefined reference to `av_find_stream_info'
src/libdlna.so: undefined reference to `av_close_input_file'
collect2: error: ld returned 1 exit status

ffmpeg API changes:
av_find_stream_info -> avformat_find_stream_info
av_close_input_file -> avformat_close_input

patch libdlna instead of ffmpeg since recently
av_close_input_file got removed in upstream git
avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft

Signed-off-by: Dirk Neukirchen <dirkneukirchen at web.de>
---
 libs/libdlna/patches/200-parallel-build.patch |  4 ++--
 libs/libdlna/patches/300-ffmpeg_compat.patch  | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/libs/libdlna/patches/200-parallel-build.patch b/libs/libdlna/patches/200-parallel-build.patch
index 7f9934b..0e1b942 100644
--- a/libs/libdlna/patches/200-parallel-build.patch
+++ b/libs/libdlna/patches/200-parallel-build.patch
@@ -2,8 +2,8 @@
  Makefile |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
---- libdlna-0.2.3.orig/Makefile
-+++ libdlna-0.2.3/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -32,8 +32,8 @@ lib:
  
  test: $(LIBTEST)
diff --git a/libs/libdlna/patches/300-ffmpeg_compat.patch b/libs/libdlna/patches/300-ffmpeg_compat.patch
index 8fb9b39..7ab69d1 100644
--- a/libs/libdlna/patches/300-ffmpeg_compat.patch
+++ b/libs/libdlna/patches/300-ffmpeg_compat.patch
@@ -16,6 +16,24 @@
      {
        video_stream = i;
        continue;
+@@ -287,7 +287,7 @@ dlna_guess_media_profile (dlna_t *dlna,
+     return NULL;
+   }
+ 
+-  if (av_find_stream_info (ctx) < 0)
++  if (avformat_find_stream_info (ctx, NULL) < 0)
+   {
+     if (dlna->verbosity)
+       fprintf (stderr, "can't find stream info\n");
+@@ -334,7 +334,7 @@ dlna_guess_media_profile (dlna_t *dlna,
+     p = p->next;
+   }
+ 
+-  av_close_input_file (ctx);
++  avformat_close_input (&ctx);
+   free (codecs);
+   return profile;
+ }
 --- a/src/profiles.h
 +++ b/src/profiles.h
 @@ -25,6 +25,14 @@
-- 
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list