Your message dated Wed, 27 Apr 2016 21:39:11 +0000
with message-id <e1avxat-0007h5...@franck.debian.org>
and subject line Bug#803833: fixed in libavg 1.8.1-2.1
has caused the Debian Bug report #803833,
regarding libavg: 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 ow...@bugs.debian.org
immediately.)


-- 
803833: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803833
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libavg
Version: 1.8.1-2
Severity: important
Tags: patch
User: pkg-multimedia-maintain...@lists.alioth.debian.org
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..dcef95b
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,314 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
+Last-Update: <2015-11-02>
+
+--- libavg-1.8.1.orig/src/player/VideoWriterThread.cpp
++++ libavg-1.8.1/src/player/VideoWriterThread.cpp
+@@ -35,7 +35,7 @@ using namespace std;
+ namespace avg {
+ 
+ const unsigned int VIDEO_BUFFER_SIZE = 400000;
+-const AVPixelFormat STREAM_PIXEL_FORMAT = ::PIX_FMT_YUVJ420P;
++const AVPixelFormat STREAM_PIXEL_FORMAT = ::AV_PIX_FMT_YUVJ420P;
+ 
+ VideoWriterThread::VideoWriterThread(CQueue& cmdQueue, const string& sFilename,
+         IntPoint size, int frameRate, int qMin, int qMax)
+@@ -95,7 +95,7 @@ void VideoWriterThread::close()
+ 
+         av_free(m_pOutputFormatContext);
+         av_free(m_pVideoBuffer);
+-        av_free(m_pConvertedFrame);
++        av_frame_free(&m_pConvertedFrame);
+         av_free(m_pPictureBuffer);
+         sws_freeContext(m_pFrameConversionContext);
+         m_pOutputFormatContext = 0;
+@@ -174,7 +174,7 @@ void VideoWriterThread::open()
+     }
+ 
+     m_pFrameConversionContext = sws_getContext(m_Size.x, m_Size.y, 
+-            ::PIX_FMT_RGB32, m_Size.x, m_Size.y, STREAM_PIXEL_FORMAT, 
++            ::AV_PIX_FMT_RGB32, m_Size.x, m_Size.y, STREAM_PIXEL_FORMAT,
+             SWS_BILINEAR, NULL, NULL, NULL);
+ 
+     m_pConvertedFrame = createFrame(STREAM_PIXEL_FORMAT, m_Size);
+@@ -234,7 +234,7 @@ AVFrame* VideoWriterThread::createFrame(
+ {
+     AVFrame* pPicture;
+ 
+-    pPicture = avcodec_alloc_frame();
++    pPicture = av_frame_alloc();
+ 
+     int memNeeded = avpicture_get_size(pixelFormat, size.x, size.y);
+     m_pPictureBuffer = static_cast<unsigned char*>(av_malloc(memNeeded));
+--- libavg-1.8.1.orig/src/video/AudioDecoderThread.cpp
++++ libavg-1.8.1/src/video/AudioDecoderThread.cpp
+@@ -134,7 +134,7 @@ void AudioDecoderThread::decodePacket(AV
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 25, 0)
+     int gotFrame = 0;
+     AVFrame* pDecodedFrame;
+-    pDecodedFrame = avcodec_alloc_frame();
++    pDecodedFrame = av_frame_alloc();
+ #endif
+     while (pTempPacket->size > 0) {
+         int bytesDecoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+@@ -192,7 +192,7 @@ void AudioDecoderThread::decodePacket(AV
+     }
+     av_free(pDecodedData);
+ #if LIBAVCODEC_VERSION_MAJOR > 53
+-    avcodec_free_frame(&pDecodedFrame);
++    av_frame_free(&pDecodedFrame);
+ #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 25, 0)
+     delete pDecodedFrame;
+ #endif
+--- libavg-1.8.1.orig/src/video/FFMpegFrameDecoder.cpp
++++ libavg-1.8.1/src/video/FFMpegFrameDecoder.cpp
+@@ -119,29 +119,29 @@ void FFMpegFrameDecoder::convertFrameToB
+     switch (pBmp->getPixelFormat()) {
+         case R8G8B8X8:
+         case R8G8B8A8:
+-            destFmt = PIX_FMT_RGBA;
++            destFmt = AV_PIX_FMT_RGBA;
+             break;
+         case B8G8R8X8:
+         case B8G8R8A8:
+-            destFmt = PIX_FMT_BGRA;
++            destFmt = AV_PIX_FMT_BGRA;
+             break;
+         case R8G8B8:
+-            destFmt = PIX_FMT_RGB24;
++            destFmt = AV_PIX_FMT_RGB24;
+             break;
+         case B8G8R8:
+-            destFmt = PIX_FMT_BGR24;
++            destFmt = AV_PIX_FMT_BGR24;
+             break;
+         case YCbCr422:
+-            destFmt = PIX_FMT_YUYV422;
++            destFmt = AV_PIX_FMT_YUYV422;
+             break;
+         default:
+             AVG_ASSERT_MSG(false, (string("FFMpegFrameDecoder: Dest format ") +
+                     toString(pBmp->getPixelFormat()) + " not supported.").c_str());
+-            destFmt = PIX_FMT_BGRA;
++            destFmt = AV_PIX_FMT_BGRA;
+     }
+     AVCodecContext const* pContext = m_pStream->codec;
+-    if (destFmt == PIX_FMT_BGRA && (pContext->pix_fmt == PIX_FMT_YUV420P || 
+-                pContext->pix_fmt == PIX_FMT_YUVJ420P))
++    if (destFmt == AV_PIX_FMT_BGRA && (pContext->pix_fmt == AV_PIX_FMT_YUV420P ||
++                pContext->pix_fmt == AV_PIX_FMT_YUVJ420P))
+     {
+         ScopeTimer timer(ConvertImageLibavgProfilingZone);
+         BitmapPtr pBmpY(new Bitmap(pBmp->getSize(), I8, pFrame->data[0],
+@@ -151,7 +151,7 @@ void FFMpegFrameDecoder::convertFrameToB
+         BitmapPtr pBmpV(new Bitmap(pBmp->getSize(), I8, pFrame->data[2],
+                 pFrame->linesize[2], false));
+         pBmp->copyYUVPixels(*pBmpY, *pBmpU, *pBmpV, 
+-                pContext->pix_fmt == PIX_FMT_YUVJ420P);
++                pContext->pix_fmt == AV_PIX_FMT_YUVJ420P);
+     } else {
+         if (!m_pSwsContext) {
+             m_pSwsContext = sws_getContext(pContext->width, pContext->height, 
+--- libavg-1.8.1.orig/src/video/SyncVideoDecoder.cpp
++++ libavg-1.8.1/src/video/SyncVideoDecoder.cpp
+@@ -82,7 +82,7 @@ void SyncVideoDecoder::startDecoding(boo
+     m_pFrameDecoder = FFMpegFrameDecoderPtr(new FFMpegFrameDecoder(getVideoStream()));
+     m_pFrameDecoder->setFPS(m_FPS);
+ #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54, 28, 0) 
+-    m_pFrame = avcodec_alloc_frame();
++    m_pFrame = av_frame_alloc();
+ #else
+     m_pFrame = new AVFrame;
+ #endif
+@@ -96,7 +96,7 @@ void SyncVideoDecoder::close()
+     m_pFrameDecoder = FFMpegFrameDecoderPtr();
+     VideoDecoder::close();
+ #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54, 28, 0) 
+-    avcodec_free_frame(&m_pFrame);
++    av_frame_free(&m_pFrame);
+ #else
+     delete m_pFrame;
+ #endif
+--- libavg-1.8.1.orig/src/video/VDPAUDecoder.cpp
++++ libavg-1.8.1/src/video/VDPAUDecoder.cpp
+@@ -43,7 +43,7 @@ namespace avg {
+ VDPAUDecoder::VDPAUDecoder()
+     : m_VDPDecoder(VDP_INVALID_HANDLE),
+       m_VDPMixer(VDP_INVALID_HANDLE),
+-      m_PixFmt(PIX_FMT_NONE),
++      m_PixFmt(AV_PIX_FMT_NONE),
+       m_Size(-1,-1)
+ {
+ }
+@@ -92,8 +92,7 @@ AVCodec* VDPAUDecoder::openCodec(AVCodec
+             pCodec = 0;
+     }
+     if (pCodec) {
+-        pContext->get_buffer = VDPAUDecoder::getBuffer;
+-        pContext->release_buffer = VDPAUDecoder::releaseBuffer;
++        pContext->get_buffer2 = VDPAUDecoder::getBuffer2;
+         pContext->draw_horiz_band = VDPAUDecoder::drawHorizBand;
+         pContext->get_format = VDPAUDecoder::getFormat;
+         pContext->slice_flags = SLICE_FLAG_CODED_ORDER | SLICE_FLAG_ALLOW_FIELD;
+@@ -111,19 +110,19 @@ bool VDPAUDecoder::isAvailable()
+ #endif
+ }
+ 
+-int VDPAUDecoder::getBuffer(AVCodecContext* pContext, AVFrame* pFrame)
++int VDPAUDecoder::getBuffer2(AVCodecContext* pContext, AVFrame* pFrame, int flags)
+ {
+     VDPAUDecoder* pVDPAUDecoder = (VDPAUDecoder*)pContext->opaque;
+     return pVDPAUDecoder->getBufferInternal(pContext, pFrame);
+ }
+ 
+ // does not release the render structure, that will be unlocked after getting data
+-void VDPAUDecoder::releaseBuffer(struct AVCodecContext* pContext, AVFrame* pFrame)
++void VDPAUDecoder::dummy_free_buffer(void *opaque, uint8_t *data)
+ {
++    AVFrame* pFrame = (AVFrame*)opaque;
+     pFrame->data[0] = 0;
+ }
+ 
+-
+ // main rendering routine
+ void VDPAUDecoder::drawHorizBand(struct AVCodecContext* pContext, const AVFrame* src,
+         int offset[4], int y, int type, int height)
+@@ -136,15 +135,15 @@ AVPixelFormat VDPAUDecoder::getFormat(AV
+ {
+     switch (pContext->codec_id) {
+         case AV_CODEC_ID_H264:
+-            return PIX_FMT_VDPAU_H264;
++            return AV_PIX_FMT_VDPAU_H264;
+         case AV_CODEC_ID_MPEG1VIDEO:
+-            return PIX_FMT_VDPAU_MPEG1;
++            return AV_PIX_FMT_VDPAU_MPEG1;
+         case AV_CODEC_ID_MPEG2VIDEO:
+-            return PIX_FMT_VDPAU_MPEG2;
++            return AV_PIX_FMT_VDPAU_MPEG2;
+         case AV_CODEC_ID_WMV3:
+-            return PIX_FMT_VDPAU_WMV3;
++            return AV_PIX_FMT_VDPAU_WMV3;
+         case AV_CODEC_ID_VC1:
+-            return PIX_FMT_VDPAU_VC1;
++            return AV_PIX_FMT_VDPAU_VC1;
+         default:
+             return pFmt[0];
+     }
+@@ -174,8 +173,8 @@ vdpau_render_state* VDPAUDecoder::getFre
+ int VDPAUDecoder::getBufferInternal(AVCodecContext* pContext, AVFrame* pFrame)
+ {
+     vdpau_render_state* pRenderState = getFreeRenderState();
+-    pFrame->data[0] = (uint8_t*)pRenderState;
+-    pFrame->type = FF_BUFFER_TYPE_USER;
++    pFrame->buf[0] = av_buffer_create((uint8_t*)pRenderState, 0, VDPAUDecoder::dummy_free_buffer, pFrame, 0);
++    pFrame->data[0] = pFrame->buf[0]->data;
+ 
+     pRenderState->state |= FF_VDPAU_STATE_USED_FOR_REFERENCE;
+     return 0;
+@@ -202,19 +201,19 @@ void VDPAUDecoder::setupDecoder(AVCodecC
+     // Create new decoder and mixer.
+     VdpDecoderProfile profile = 0;
+     switch (pContext->pix_fmt) {
+-        case PIX_FMT_VDPAU_MPEG1:
++        case AV_PIX_FMT_VDPAU_MPEG1:
+             profile = VDP_DECODER_PROFILE_MPEG1;
+             break;
+-        case PIX_FMT_VDPAU_MPEG2:
++        case AV_PIX_FMT_VDPAU_MPEG2:
+             profile = VDP_DECODER_PROFILE_MPEG2_MAIN;
+             break;
+-        case PIX_FMT_VDPAU_H264:
++        case AV_PIX_FMT_VDPAU_H264:
+             profile = VDP_DECODER_PROFILE_H264_HIGH;
+             break;
+-        case PIX_FMT_VDPAU_WMV3:
++        case AV_PIX_FMT_VDPAU_WMV3:
+             profile = VDP_DECODER_PROFILE_VC1_SIMPLE;
+             break;
+-        case PIX_FMT_VDPAU_VC1:
++        case AV_PIX_FMT_VDPAU_VC1:
+             profile = VDP_DECODER_PROFILE_VC1_SIMPLE;
+             break;
+         default:
+--- libavg-1.8.1.orig/src/video/VDPAUDecoder.h
++++ libavg-1.8.1/src/video/VDPAUDecoder.h
+@@ -43,8 +43,8 @@ public:
+ 
+ private:
+     // Callbacks
+-    static int getBuffer(AVCodecContext* pContext, AVFrame* pFrame);
+-    static void releaseBuffer(struct AVCodecContext* pContext, AVFrame* pFrame);
++    static int getBuffer2(AVCodecContext* pContext, AVFrame* pFrame, int flags);
++    static void dummy_free_buffer(void *opaque, uint8_t *data);
+     static void drawHorizBand(AVCodecContext* pContext, const AVFrame* pFrame, 
+             int offset[4], int y, int type, int height);
+     static AVPixelFormat getFormat(AVCodecContext* pContext, const AVPixelFormat* pFmt);
+--- libavg-1.8.1.orig/src/video/VideoDecoder.cpp
++++ libavg-1.8.1/src/video/VideoDecoder.cpp
+@@ -439,25 +439,25 @@ PixelFormat VideoDecoder::calcPixelForma
+     AVCodecContext const* pContext = getCodecContext();
+     if (bUseYCbCr) {
+         switch(pContext->pix_fmt) {
+-            case PIX_FMT_YUV420P:
++            case AV_PIX_FMT_YUV420P:
+ #ifdef AVG_ENABLE_VDPAU
+-            case PIX_FMT_VDPAU_H264:
+-            case PIX_FMT_VDPAU_MPEG1:
+-            case PIX_FMT_VDPAU_MPEG2:
+-            case PIX_FMT_VDPAU_WMV3:
+-            case PIX_FMT_VDPAU_VC1:
++            case AV_PIX_FMT_VDPAU_H264:
++            case AV_PIX_FMT_VDPAU_MPEG1:
++            case AV_PIX_FMT_VDPAU_MPEG2:
++            case AV_PIX_FMT_VDPAU_WMV3:
++            case AV_PIX_FMT_VDPAU_VC1:
+ #endif
+                 return YCbCr420p;
+-            case PIX_FMT_YUVJ420P:
++            case AV_PIX_FMT_YUVJ420P:
+                 return YCbCrJ420p;
+-            case PIX_FMT_YUVA420P:
++            case AV_PIX_FMT_YUVA420P:
+                 return YCbCrA420p;
+             default:
+                 break;
+         }
+     }
+-    bool bAlpha = (pContext->pix_fmt == PIX_FMT_BGRA ||
+-            pContext->pix_fmt == PIX_FMT_YUVA420P);
++    bool bAlpha = (pContext->pix_fmt == AV_PIX_FMT_BGRA ||
++            pContext->pix_fmt == AV_PIX_FMT_YUVA420P);
+     return BitmapLoader::get()->getDefaultPixelFormat(bAlpha);
+ }
+ 
+--- libavg-1.8.1.orig/src/video/VideoDecoderThread.cpp
++++ libavg-1.8.1/src/video/VideoDecoderThread.cpp
+@@ -59,7 +59,7 @@ VideoDecoderThread::~VideoDecoderThread(
+ bool VideoDecoderThread::init()
+ {
+ #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54, 28, 0) 
+-    m_pFrame = avcodec_alloc_frame();
++    m_pFrame = av_frame_alloc();
+ #else
+     m_pFrame = new AVFrame;
+ #endif
+@@ -69,7 +69,7 @@ bool VideoDecoderThread::init()
+ void VideoDecoderThread::deinit()
+ {
+ #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54, 28, 0) 
+-    avcodec_free_frame(&m_pFrame);
++    av_frame_free(&m_pFrame);
+ #else
+     delete m_pFrame;
+ #endif
+--- libavg-1.8.1.orig/src/video/WrapFFMpeg.h
++++ libavg-1.8.1/src/video/WrapFFMpeg.h
+@@ -86,8 +86,6 @@ extern "C" {
+ 
+ #ifdef PixelFormat
+ #undef PixelFormat
+-#else
+-#define AVPixelFormat ::PixelFormat
+ #endif
+ 
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index abe4148..a9e9e36 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 foreign.patch
 reproducible_build.patch
+ffmpeg_2.9.patch

--- End Message ---
--- Begin Message ---
Source: libavg
Source-Version: 1.8.1-2.1

We believe that the bug you reported is fixed in the latest version of
libavg, 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 803...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Ramacher <sramac...@debian.org> (supplier of updated libavg 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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 25 Apr 2016 19:30:01 +0200
Source: libavg
Binary: python-libavg
Architecture: source
Version: 1.8.1-2.1
Distribution: unstable
Urgency: medium
Maintainer: Dimitri John Ledkov <x...@debian.org>
Changed-By: Sebastian Ramacher <sramac...@debian.org>
Description:
 python-libavg - High-level development platform for media-centric applications
Closes: 803833
Changes:
 libavg (1.8.1-2.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
 .
   [ Andreas Cadhalpun ]
   * Fix build against ffmpeg 3.0. (Closes: #803833)
Checksums-Sha1:
 a3a5dbc12e8b910a8368191d972737af6f0a912a 2110 libavg_1.8.1-2.1.dsc
 9a42cbbcc92bbefe0d81ac3037fa1252c260d89c 12068 libavg_1.8.1-2.1.debian.tar.xz
Checksums-Sha256:
 a44b89686c94969c89e91968c50cf437df4ed3e03045476b66c82ca7fb116328 2110 
libavg_1.8.1-2.1.dsc
 174a12009ac20d79db64bc00d5b169d9c4ea4240b51ba0f1e60c9c5d0988636d 12068 
libavg_1.8.1-2.1.debian.tar.xz
Files:
 1f2de0779a65dcbdf2302699c72e5b9f 2110 python optional libavg_1.8.1-2.1.dsc
 9087e2165adb31519649b10e29f4ae7f 12068 python optional 
libavg_1.8.1-2.1.debian.tar.xz

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

iQIcBAEBCAAGBQJXHn4YAAoJEGny/FFupxmTfIAP/jSl88A95qzCNynoK1a/Mzj2
/VHE9L8Ci442IGPj3ju+60e9YuQ/O4vfy4l9QPX46TsPZp+j191V2cPEjnLYJb39
yons2pyl+ipbMPrjsg9P9SexyvXp6qY3BqVhrfBIw05qcdXEEPQ95VviHuV7tjiH
9fOwgJ3cbFqyswjV6kNAp01Rfjtt1b7pdLJsNzMERYG1AUUEDnN8gLe4Kt8VKP3+
a+B50gDVvqrYF0UUxFQuTfqafG3oNxpOw/d4lIhquEK00wOcfBi4DNWGoV/nZjYQ
+7k+dxv+hpPI/Q+TEB0itAZxxFvrF0r0XPa3uxAV12vnzYYyMNUSZTzRu0suGStu
JPM5jKOlug40l8sZaFd6RPKnmf8QQoAA4P2VkJpe5/tlFbXXSgOZ2EyFX4ay/n+w
798WMOOTKcagZ45MSE/Mm2/ugAF9QRF27OX7f+bYRPH5iY6PIifwS9xSFNwxEQp+
HQtJVoazN7NUGZ7L8g2dEAmmVkDJuhuq+uOjuy3a9V+wGk0q+LtIb674RoIdku9r
nF+4D4YL0bRrs87tdU+QnxCIA2ikfLaSQVfvtP/SDRiOa84AWhe4xnmggdc+cEs9
XL9uh7k62Cx0kjHZUKn3K44Otf8Gp14iXg6/LJLmixkox1DmBKfuvIY0b10mmGlV
6R3wnecvt5U7Osm957D4
=7Rrl
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to