From patchwork Mon Mar 28 19:49:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 602631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3qYl125Hfgz9sB6 for ; Tue, 29 Mar 2016 06:52:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0558D32CD8; Mon, 28 Mar 2016 19:52:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HYiXJvt+IgPa; Mon, 28 Mar 2016 19:52:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 364D4308CE; Mon, 28 Mar 2016 19:50:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6033B1BFC8C for ; Mon, 28 Mar 2016 19:50:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 57E3C32257 for ; Mon, 28 Mar 2016 19:50:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nmQoi6at-Eba for ; Mon, 28 Mar 2016 19:50:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by silver.osuosl.org (Postfix) with ESMTPS id C737C31EAB for ; Mon, 28 Mar 2016 19:50:07 +0000 (UTC) Received: from fwd25.aul.t-online.de (fwd25.aul.t-online.de [172.20.26.130]) by mailout07.t-online.de (Postfix) with SMTP id 326A048A445 for ; Mon, 28 Mar 2016 21:50:06 +0200 (CEST) Received: from fli4l.lan.fli4l (VT7qIcZ1YhN9wRS6aHZ31RLYGuhFUPei+b0PT6d8sbssuKs0Q27eSsuxSPSRU9AwVX@[84.178.249.144]) by fwd25.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1akdAh-3lvfZQ0; Mon, 28 Mar 2016 21:49:55 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:38476 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.87) (envelope-from ) id 1akdAg-00020D-5a; Mon, 28 Mar 2016 21:49:54 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Mon, 28 Mar 2016 21:49:34 +0200 Message-Id: <1459194585-12593-9-git-send-email-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459194585-12593-1-git-send-email-bernd.kuhls@t-online.de> References: <1459194585-12593-1-git-send-email-bernd.kuhls@t-online.de> X-ID: VT7qIcZ1YhN9wRS6aHZ31RLYGuhFUPei+b0PT6d8sbssuKs0Q27eSsuxSPSRU9AwVX X-TOI-MSGID: 4e2f0f94-148e-4798-ad18-854d5cb6bb4a Cc: Bernd Kuhls Subject: [Buildroot] [PATCH v4 08/19] package/squeezelite: fix compilation with ffmpeg >= 2.9 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- package/squeezelite/0003-ffmpeg_2_9.patch | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/squeezelite/0003-ffmpeg_2_9.patch diff --git a/package/squeezelite/0003-ffmpeg_2_9.patch b/package/squeezelite/0003-ffmpeg_2_9.patch new file mode 100644 index 0000000..f69b829 --- /dev/null +++ b/package/squeezelite/0003-ffmpeg_2_9.patch @@ -0,0 +1,57 @@ +Fix compilation with ffmpeg >= 2.9 + +Downloaded from Debian: +https://sources.debian.net/src/squeezelite/1.8-3/debian/patches/ffmpeg_2.9.patch/ + +Signed-off-by: Bernd Kuhls + + +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-02> + +--- squeezelite-1.8.orig/ffmpeg.c ++++ squeezelite-1.8/ffmpeg.c +@@ -52,8 +52,8 @@ struct ff_s { + unsigned (* avcodec_version)(void); + AVCodec * (* avcodec_find_decoder)(int); + int attribute_align_arg (* avcodec_open2)(AVCodecContext *, const AVCodec *, AVDictionary **); +- AVFrame * (* avcodec_alloc_frame)(void); +- void (* avcodec_free_frame)(AVFrame **); ++ AVFrame * (* av_frame_alloc)(void); ++ void (* av_frame_free)(AVFrame **); + int attribute_align_arg (* avcodec_decode_audio4)(AVCodecContext *, AVFrame *, int *, const AVPacket *); + // ffmpeg symbols to be dynamically loaded from libavformat + unsigned (* avformat_version)(void); +@@ -324,7 +324,7 @@ static decode_state ff_decode(void) { + + AVCODEC(ff, open2, ff->codecC, codec, NULL); + +- ff->frame = AVCODEC(ff, alloc_frame); ++ ff->frame = AV(ff, frame_alloc); + + ff->avpkt = AV(ff, malloc, sizeof(AVPacket)); + if (ff->avpkt == NULL) { +@@ -520,9 +520,9 @@ static void _free_ff_data(void) { + if (ff->frame) { + // ffmpeg version dependant free function + #if !LINKALL +- ff->avcodec_free_frame ? AVCODEC(ff, free_frame, &ff->frame) : AV(ff, freep, &ff->frame); ++ ff->av_frame_free ? AV(ff, frame_free, &ff->frame) : AV(ff, freep, &ff->frame); + #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54,28,0) +- AVCODEC(ff, free_frame, &ff->frame); ++ AV(ff, frame_free, &ff->frame); + #else + AV(ff, freep, &ff->frame); + #endif +@@ -607,8 +607,8 @@ static bool load_ff() { + ff->avcodec_version = dlsym(handle_codec, "avcodec_version"); + ff->avcodec_find_decoder = dlsym(handle_codec, "avcodec_find_decoder"); + ff->avcodec_open2 = dlsym(handle_codec, "avcodec_open2"); +- ff->avcodec_alloc_frame = dlsym(handle_codec, "avcodec_alloc_frame"); +- ff->avcodec_free_frame = dlsym(handle_codec, "avcodec_free_frame"); ++ ff->av_frame_alloc = dlsym(handle_codec, "av_frame_alloc"); ++ ff->av_frame_free = dlsym(handle_codec, "av_frame_free"); + ff->avcodec_decode_audio4 = dlsym(handle_codec, "avcodec_decode_audio4"); + ff->av_init_packet = dlsym(handle_codec, "av_init_packet"); + ff->av_free_packet = dlsym(handle_codec, "av_free_packet");