Bug#803833: libavg: FTBFS with FFmpeg 2.9

2016-01-08 Thread Andreas Cadhalpun
Hi Dimitri,

Thanks for your fast reply.

On 08.01.2016 13:41, Dimitri John Ledkov wrote:
> All my packages should be marked as LowNMU and I expect and hope for
> everyone to fix and upload things =)
> 
> So instead of filing a bug report and/or attaching a patch, you could
> have simply uploaded this build fix =)

If I were a DD, that is. Though, of course, I could ask you to sponsor
such an upload. ;)

> Please upload it, otherwise I shall test and upload it at some point
> in the future when it becomes critical...

I guess that should work, but I certainly would appreciate an upload
before this gets critical: That means less stress for you, me and the
Release Team.

Best regards,
Andreas



Bug#803833: libavg: FTBFS with FFmpeg 2.9

2016-01-08 Thread Dimitri John Ledkov
Hi,

On 7 January 2016 at 23:07, Andreas Cadhalpun
 wrote:
> Dear Maintainer,
>
> the next version of FFmpeg is planned to be released this month
> (and it might be called 3.0 instead of 2.9).
>
> Since I haven't heard back from you during the past two month
> I'm wondering what the status of this bug is:
>  * Are you aware of the patch I provided?
>  * Do you plan an upload soon?
>  * Is upstream aware of the problem?
>
> If this bug isn't fixed soon, it will become release critical and
> thus the package will either get NMUed or removed from testing.

All my packages should be marked as LowNMU and I expect and hope for
everyone to fix and upload things =)

So instead of filing a bug report and/or attaching a patch, you could
have simply uploaded this build fix =)

Please upload it, otherwise I shall test and upload it at some point
in the future when it becomes critical...

-- 
Regards,

Dimitri.



Bug#803833: libavg: FTBFS with FFmpeg 2.9

2016-01-07 Thread Andreas Cadhalpun
Dear Maintainer,

the next version of FFmpeg is planned to be released this month
(and it might be called 3.0 instead of 2.9).

Since I haven't heard back from you during the past two month
I'm wondering what the status of this bug is:
 * Are you aware of the patch I provided?
 * Do you plan an upload soon?
 * Is upstream aware of the problem?

If this bug isn't fixed soon, it will become release critical and
thus the package will either get NMUed or removed from testing.

Best regards,
Andreas



Bug#803833: libavg: FTBFS with FFmpeg 2.9

2015-11-02 Thread Andreas Cadhalpun
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 000..dcef95b
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,314 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun 
+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 = 40;
+-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(_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(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();
++av_frame_free();
+ #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],