Your message dated Wed, 04 Nov 2015 07:33:52 +0000
with message-id <[email protected]>
and subject line Bug#803801: fixed in avifile 1:0.7.48~20090503.ds-18
has caused the Debian Bug report #803801,
regarding avifile: FTBFS with FFmpeg 2.9
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
803801: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803801
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: avifile
Version: 0.7.48~20090503.ds-17
Severity: important
Tags: patch
User: [email protected]
Usertags: ffmpeg2.9

Dear Maintainer,

your package fails to build with the upcoming ffmpeg 2.9.
This bug will become release-critical at some point when the
ffmpeg2.9 transition gets closer.

Attached is a patch replacing the deprecated functionality.
It also works with ffmpeg 2.8.
Please apply this patch and forward it upstream, if necessary.

These changes are non-trivial and should be runtime-tested.

Best regards,
Andreas

diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..a6dfa80
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,177 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2015-11-02>
+
+--- avifile-0.7.48~20090503.ds.orig/plugins/libffmpeg/FFVideoDecoder.cpp
++++ avifile-0.7.48~20090503.ds/plugins/libffmpeg/FFVideoDecoder.cpp
+@@ -18,6 +18,11 @@ static float ftm = 0;
+ 
+ #define Debug if (0)
+ 
++typedef struct BufferData_ {
++    void *decoder;
++    AVFrame *pic;
++} BufferData;
++
+ AVM_BEGIN_NAMESPACE;
+ 
+ FFVideoDecoder::FFVideoDecoder(AVCodec* av, const CodecInfo& info, const BITMAPINFOHEADER& bh, int flip)
+@@ -77,23 +82,26 @@ static void draw_slice(struct AVCodecCon
+     d->m_pImg->Slice(&ci);
+ }
+ 
++static void free_buffer(void *opaque, uint8_t *data);
++
+ // callback to supply rendering buffer to ffmpeg
+-static int get_buffer(AVCodecContext* avctx, AVFrame* pic)
++static int get_buffer(AVCodecContext* avctx, AVFrame* pic, int flags)
+ {
+     static const char ftypes[][3] = { "I", "P", "B", "S", "SI", "SP" };
+ 
++    BufferData *buf_dat;
++
+     FFVideoDecoder* d = (FFVideoDecoder*) avctx->opaque;
+     CImage* pImage = d->m_pImg;
+-    if ((avctx->pix_fmt != PIX_FMT_YUV420P
+-        && avctx->pix_fmt != PIX_FMT_YUVJ420P)
++    if ((avctx->pix_fmt != AV_PIX_FMT_YUV420P
++        && avctx->pix_fmt != AV_PIX_FMT_YUVJ420P)
+ 	|| !pImage || !d->m_bDirect)
+     {
+ 	Debug printf("FF: Unsupported pixel format for Dr1 %d\n", avctx->pix_fmt); //abort();
+-	return avcodec_default_get_buffer(avctx, pic);
++	return avcodec_default_get_buffer2(avctx, pic, flags);
+     }
+ 
+     d->m_bUsed = true;
+-    Debug if (pic->buffer_hints) printf("FF bufhints 0x%x\n", pic->buffer_hints);
+ 
+     pic->opaque = pImage;
+ #if 0
+@@ -107,41 +115,38 @@ static int get_buffer(AVCodecContext* av
+ 	}
+ #endif
+     // we are using YV12 - ffmpeg uses I420
+-    pic->data[0] = pImage->Data(0);
+-    pic->data[1] = pImage->Data(2);
+-    pic->data[2] = pImage->Data(1);
++    buf_dat = (BufferData*)av_malloc(sizeof(*buf_dat));
++    buf_dat->decoder = d;
++    buf_dat->pic = pic;
++    pic->buf[0] = av_buffer_create (pImage->Data(0), 0, free_buffer, buf_dat, 0);
++    pic->buf[1] = av_buffer_create (pImage->Data(1), 0, free_buffer, NULL, 0);
++    pic->buf[2] = av_buffer_create (pImage->Data(2), 0, free_buffer, NULL, 0);
++    pic->data[0] = pic->buf[0]->data;
++    pic->data[1] = pic->buf[1]->data;
++    pic->data[2] = pic->buf[2]->data;
+     pic->linesize[0] = pImage->Stride(0);
+     pic->linesize[1] = pImage->Stride(2); // Note: for ffmpeg linsize[1] == linesize[2]!
+     pic->linesize[2] = pImage->Stride(1);
+     pic->pts = pImage->m_lTimestamp;
+-    pic->type = FF_BUFFER_TYPE_USER;
+     pImage->m_iType = pic->pict_type;
+ 
+-    if (pic->reference)
+-	pImage->Age(pic->coded_picture_number);
+-    else
+ 	pImage->Age();
+ 
+-    Debug printf("FF: <<<< GetBuffer %p  %s %dx%d %p:%p:%p s:%f f:%d r:%d  age:%d\n", pImage, ftypes[pic->pict_type],
++    Debug printf("FF: <<<< GetBuffer %p  %s %dx%d %p:%p:%p s:%f f:%d\n", pImage, ftypes[pic->pict_type],
+ 		 avctx->width, avctx->height, pImage->Data(0), pImage->Data(2), pImage->Data(1),
+-		 (double)pImage->m_lTimestamp / 1000000., avctx->pix_fmt, pic->reference);
++		 (double)pImage->m_lTimestamp / 1000000., avctx->pix_fmt);
+     return 0;
+ }
+ 
+-static void release_buffer(struct AVCodecContext* avctx, AVFrame* pic)
++static void free_buffer(void *opaque, uint8_t *data)
+ {
+-    if (pic->type == FF_BUFFER_TYPE_USER)
+-    {
+-	FFVideoDecoder* d = (FFVideoDecoder*) avctx->opaque;
+-	d->m_pReleased = (CImage*) pic->opaque;
+-	Debug printf("FF: >>>> Released buffer %p  %p\n", pic->opaque, pic);
+-	memset(pic->data, 0, sizeof(void*) * 4);
+-	pic->opaque = NULL;
+-    }
+-    else
+-    {
+-	Debug printf(">>>> released default buffer *****************\n");
+-	avcodec_default_release_buffer(avctx, pic);
++    if (opaque) {
++        BufferData *buf_dat = (BufferData *) opaque;
++        FFVideoDecoder* d = (FFVideoDecoder*) buf_dat->decoder;
++        d->m_pReleased = (CImage*) buf_dat->pic->opaque;
++        Debug printf("FF: >>>> Released buffer %p  %p\n", buf_dat->pic->opaque, buf_dat->pic);
++        buf_dat->pic->opaque = NULL;
++        av_free(buf_dat);
+     }
+ }
+ 
+@@ -205,7 +210,6 @@ int FFVideoDecoder::DecodeFrame(CImage*
+ 		{
+ 		    // for DR we needs some special width aligment
+ 		    // also there are some more limitation
+-		    m_pAvContext->flags |= CODEC_FLAG_EMU_EDGE;
+ 		    drtxt = "using";
+ 		    m_bDirect = true;
+ 		    //m_pAvContext->skip_top = 32;
+@@ -214,9 +218,7 @@ int FFVideoDecoder::DecodeFrame(CImage*
+ 		    m_pAvContext->skip_idct = AVDISCARD_BIDIR;
+ 		    m_pAvContext->skip_frame = AVDISCARD_BIDIR;
+                     */
+-		    m_pAvContext->get_buffer = get_buffer;
+-		    m_pAvContext->reget_buffer = get_buffer;
+-		    m_pAvContext->release_buffer = release_buffer;
++		    m_pAvContext->get_buffer2 = get_buffer;
+ 		}
+ 	    }
+ 	}
+@@ -369,7 +371,6 @@ int FFVideoDecoder::DecodeFrame(CImage*
+ 	    return hr | NO_PICTURE;
+ 	// let's fake got_picture;
+ 	if (!pic.opaque) {
+-	    pic.type = FF_BUFFER_TYPE_USER;
+ 	    pic.opaque = m_pReleased;
+ 	}
+ 	got_picture = true;
+@@ -384,15 +385,15 @@ int FFVideoDecoder::DecodeFrame(CImage*
+ 	Debug printf("PIXFMPT %d\n", m_pAvContext->pix_fmt);
+ 	switch (m_pAvContext->pix_fmt)
+ 	{
+-	case PIX_FMT_BGR24: imfmt = IMG_FMT_BGR24; break;
+-	case PIX_FMT_RGBA: imfmt = IMG_FMT_BGR32; break;
+-	case PIX_FMT_YUYV422: imfmt = IMG_FMT_YUY2; break;
+-	case PIX_FMT_YUV410P: imfmt = IMG_FMT_I410; break;
+-	case PIX_FMT_YUV411P: imfmt = IMG_FMT_I411; break;
+-	case PIX_FMT_YUV420P: imfmt = IMG_FMT_I420; break;
+-	case PIX_FMT_YUVJ420P: imfmt = IMG_FMT_I420; break; // strange
+-	case PIX_FMT_YUV422P: imfmt = IMG_FMT_I422; break;
+-	case PIX_FMT_YUV444P: imfmt = IMG_FMT_I444; break;
++	case AV_PIX_FMT_BGR24: imfmt = IMG_FMT_BGR24; break;
++	case AV_PIX_FMT_RGBA: imfmt = IMG_FMT_BGR32; break;
++	case AV_PIX_FMT_YUYV422: imfmt = IMG_FMT_YUY2; break;
++	case AV_PIX_FMT_YUV410P: imfmt = IMG_FMT_I410; break;
++	case AV_PIX_FMT_YUV411P: imfmt = IMG_FMT_I411; break;
++	case AV_PIX_FMT_YUV420P: imfmt = IMG_FMT_I420; break;
++	case AV_PIX_FMT_YUVJ420P: imfmt = IMG_FMT_I420; break; // strange
++	case AV_PIX_FMT_YUV422P: imfmt = IMG_FMT_I422; break;
++	case AV_PIX_FMT_YUV444P: imfmt = IMG_FMT_I444; break;
+ 	default: break;
+ 	}
+ 	if (imfmt) {
+@@ -416,11 +417,9 @@ int FFVideoDecoder::DecodeFrame(CImage*
+     //printf("SWAP  %d  %d\n", m_Order.front().position, pImage->m_uiPosition);
+     //printf("P   %d    %lld\n", p, m_Order[0].timestamp, m_Order.size());
+ 
+-    Debug printf("FF: release:%p out:%p  tuc:%d(%d/%d)\n", m_pReleased, pOut, pic.type, FF_BUFFER_TYPE_USER, FF_BUFFER_TYPE_COPY);
++    Debug printf("FF: release:%p out:%p\n", m_pReleased, pOut);
+ #if 1
+-    if (pOut && pic.opaque &&
+-	((pic.type == FF_BUFFER_TYPE_USER)
+-	 || (pic.type == FF_BUFFER_TYPE_COPY)))
++    if (pOut && pic.opaque)
+     {
+ 	*pOut = (CImage*) pic.opaque;
+ 	(*pOut)->m_lTimestamp = m_Order[0].timestamp;
diff --git a/debian/patches/series b/debian/patches/series
index 9a1921a..f59114b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ ftbfs-freebsd.patch
 ftbfs-gcc4.7.patch
 fix-ftbfs-libav9.patch
 libav10.patch
+ffmpeg_2.9.patch

--- End Message ---
--- Begin Message ---
Source: avifile
Source-Version: 1:0.7.48~20090503.ds-18

We believe that the bug you reported is fixed in the latest version of
avifile, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ying-Chun Liu (PaulLiu) <[email protected]> (supplier of updated avifile 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 04 Nov 2015 14:40:38 +0800
Source: avifile
Binary: libavifile-0.7-common libavifile-0.7c2 libavifile-0.7-dev 
libavifile-0.7-bin
Architecture: source amd64 all
Version: 1:0.7.48~20090503.ds-18
Distribution: unstable
Urgency: low
Maintainer: Ying-Chun Liu (PaulLiu) <[email protected]>
Changed-By: Ying-Chun Liu (PaulLiu) <[email protected]>
Description:
 libavifile-0.7-bin - toolkit for libavifile
 libavifile-0.7-common - toolkit for libavifile
 libavifile-0.7-dev - development header files for libavifile
 libavifile-0.7c2 - shared libraries for AVI read/writing
Closes: 801826 803801
Changes:
 avifile (1:0.7.48~20090503.ds-18) unstable; urgency=low
 .
   * Fix FTBFS with FFmpeg 2.9 (Closes: #803801)
     - Thanks to Andreas Cadhalpun <[email protected]>
   * debian/copyright: Add DivX Open license (Closes: #801826)
     - Thanks to Dmitry Smirnov <[email protected]>
Checksums-Sha1:
 b1e2187fa71f6530cf754e90128e849465606806 2245 avifile_0.7.48~20090503.ds-18.dsc
 92f041dc5953085791e07bcb5e6802d50a05bab5 32484 
avifile_0.7.48~20090503.ds-18.debian.tar.xz
 4850159bd2e389d513fe6c8abdd9b20fcbc87c4b 63298 
libavifile-0.7-bin_0.7.48~20090503.ds-18_amd64.deb
 6af10cd5e1c0305a5fa088063baf4ac4350654fe 86426 
libavifile-0.7-common_0.7.48~20090503.ds-18_all.deb
 c7921c9aab997955bcbc6f23463c8e5cf0cca5be 88756 
libavifile-0.7-dev_0.7.48~20090503.ds-18_amd64.deb
 380658e76f9dfa58dac4a8c423d1607df27eef29 293480 
libavifile-0.7c2_0.7.48~20090503.ds-18_amd64.deb
Checksums-Sha256:
 84201394abb9665dad5316f1f7cbf14e146457503cf4f0e756cc461bc6a19121 2245 
avifile_0.7.48~20090503.ds-18.dsc
 2057fed86d02e8abc663e2868b114703dc4df287bd7e3b1d9fdaa5af2b42a127 32484 
avifile_0.7.48~20090503.ds-18.debian.tar.xz
 fbae382dba6e8c8c0ab3a214e0c5571989703cb1ce404e2b28359bb74cf36070 63298 
libavifile-0.7-bin_0.7.48~20090503.ds-18_amd64.deb
 75912cc46753a139aab9af68622ec59e246bbba0ba1cb7b9845f6f5c89ce52cd 86426 
libavifile-0.7-common_0.7.48~20090503.ds-18_all.deb
 c52584be12281725c6054efe16f575f0d9245180e87244407427be91b14f6b36 88756 
libavifile-0.7-dev_0.7.48~20090503.ds-18_amd64.deb
 f18958f22d5dc4b5e840b7c3f51ee805a15891416401c34a025fc8db56b0631b 293480 
libavifile-0.7c2_0.7.48~20090503.ds-18_amd64.deb
Files:
 8e46692be443805aaff55448d1e89aeb 2245 libs optional 
avifile_0.7.48~20090503.ds-18.dsc
 b597f46ba0023892832f5e2d7ab7ae74 32484 libs optional 
avifile_0.7.48~20090503.ds-18.debian.tar.xz
 297e76c871a8caf735a9a625470fb035 63298 misc optional 
libavifile-0.7-bin_0.7.48~20090503.ds-18_amd64.deb
 baa0003f1d068bc43705139c53e7ef8a 86426 misc optional 
libavifile-0.7-common_0.7.48~20090503.ds-18_all.deb
 ed8b3e42ede5ccaa3e59eae3b460a77f 88756 libdevel optional 
libavifile-0.7-dev_0.7.48~20090503.ds-18_amd64.deb
 5aeac3cfb098aa3eaab4f2ffebeb7c27 293480 libs optional 
libavifile-0.7c2_0.7.48~20090503.ds-18_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJWObK2AAoJEEQXP6E9BYiIY6YP/jHho9tJxdlbKqUJWYjc4u/E
CiPoOWmNQMgyhFmY//aMcYfLMBwhEXhfV92mqr/V/sOzWsVPQdjKgIsSbwzbfYO9
IzmnOFURt7ZNULv4FTEw7jJBcVOECo/adXQnEc7OKZDmknKLTdIS9BQaPcfCPkx1
8FtpU97T2N5fRXTWyDxsJVdsLfCDb1ES+LKT80tQXKzEAWg3sFBGxKbyPI3dkKqM
cLMcP02q0IaFsjZeJy36xQEIQJDHjeL+2T0hBm2XV27idhYNm2Rz3kkV40kbhPa1
hlhjdNXWHT8I+ggp/HAgTzD0Ca29OJoZftY26r1VbUWRoWOHf3a+zr7QLm1QOHrV
DR44/qs+xfeqFsZj7DSYyIJkWG19azUWfqz3iK0wXm8CO63Keh+g6nMJVAgnbd3K
8GKhdUAtv6FW2X+eWIGEaR7+kenDlz6WNKBIwl51C6OAHZSNQ05aRlmVTyaehPRl
moNgV5RswCW694MrTIiKkaYrepgWhF5XeiQeGe7F5cQrfpHCh9HD0ltbcQLgSmUQ
bAqxOsh1FAP6jFgzn9UcoBQ3F+Nlo3SgxX5FMOGp1hYHEY2dE2XWEEbWZIEyqjNd
9S17BKlF9mr+jlFQk3aaPO9aQkX/Ucdpkzj7QNdg2j1lYuwv6GEIeRRSjafUB/CA
BQ/qIW/RsLnkLU581R8S
=f3On
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to