[Pkg-voip-commits] r10699 - in /opal/branches/opal-3.10/debian: changelog patches/ffmpeg_2.9.patch patches/series

dedu-guest at alioth.debian.org dedu-guest at alioth.debian.org
Mon Jan 11 16:40:08 UTC 2016


Author: dedu-guest
Date: Mon Jan 11 16:40:08 2016
New Revision: 10699

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10699
Log:
Fix FTBFS with upcoming ffmpeg 2.9, patch from A. Cadhalpun (Closes:
#803846).

Added:
    opal/branches/opal-3.10/debian/patches/ffmpeg_2.9.patch
Modified:
    opal/branches/opal-3.10/debian/changelog
    opal/branches/opal-3.10/debian/patches/series

Modified: opal/branches/opal-3.10/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/opal/branches/opal-3.10/debian/changelog?rev=10699&op=diff
==============================================================================
--- opal/branches/opal-3.10/debian/changelog	(original)
+++ opal/branches/opal-3.10/debian/changelog	Mon Jan 11 16:40:08 2016
@@ -1,3 +1,10 @@
+opal (3.10.10~dfsg2-2) unstable; urgency=low
+
+  * Fix FTBFS with upcoming ffmpeg 2.9, patch from A. Cadhalpun (Closes:
+    #803846).
+
+ -- Eugen Dedu <eugen.dedu at univ-fcomte.fr>  Mon, 11 Jan 2016 15:51:57 +0100
+
 opal (3.10.10~dfsg2-1) unstable; urgency=low
 
   * Remove one non free document (RFC) from source package.

Added: opal/branches/opal-3.10/debian/patches/ffmpeg_2.9.patch
URL: http://svn.debian.org/wsvn/pkg-voip/opal/branches/opal-3.10/debian/patches/ffmpeg_2.9.patch?rev=10699&op=file
==============================================================================
--- opal/branches/opal-3.10/debian/patches/ffmpeg_2.9.patch	(added)
+++ opal/branches/opal-3.10/debian/patches/ffmpeg_2.9.patch	Mon Jan 11 16:40:08 2016
@@ -0,0 +1,171 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Last-Update: <2015-11-02>
+
+--- opal-3.10.10~dfsg2.orig/plugins/video/H.263-1998/h263-1998.cxx
++++ opal-3.10.10~dfsg2/plugins/video/H.263-1998/h263-1998.cxx
+@@ -230,11 +230,10 @@ bool H263_Base_EncoderContext::Init(AVCo
+ 
+   m_context->opaque = this;
+ 
+-  m_context->flags = CODEC_FLAG_EMU_EDGE   // don't draw edges
+-                   | CODEC_FLAG_TRUNCATED  // Possible missing packets
++  m_context->flags = CODEC_FLAG_TRUNCATED  // Possible missing packets
+                    ;
+ 
+-  m_context->pix_fmt = PIX_FMT_YUV420P;
++  m_context->pix_fmt = AV_PIX_FMT_YUV420P;
+   m_context->gop_size = H263_KEY_FRAME_INTERVAL;
+ 
+   // X-Lite does not like Custom Picture frequency clocks... stick to 29.97Hz
+@@ -440,9 +439,6 @@ bool H263_Base_EncoderContext::OpenCodec
+   m_inputFrame->data[1] = m_inputFrame->data[0] + planeSize;
+   m_inputFrame->data[2] = m_inputFrame->data[1] + (planeSize / 4);
+ 
+-  if (m_context->width > 352)
+-    m_context->flags &= ~CODEC_FLAG_EMU_EDGE; // Totally bizarre! FFMPEG crashes if on for CIF4
+-
+   // Dump info
+   PTRACE(5, m_prefix, "Size is " << m_context->width << "x" << m_context->height);
+   PTRACE(5, m_prefix, "GOP is " << m_context->gop_size);
+@@ -456,7 +452,7 @@ bool H263_Base_EncoderContext::OpenCodec
+   PTRACE(5, m_prefix, "qmax set to " << m_context->qmax);
+   PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size);
+ 
+-  return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0;
++  return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec, NULL) == 0;
+ }
+ 
+ void H263_Base_EncoderContext::CloseCodec()
+@@ -707,7 +703,7 @@ bool H263_Base_DecoderContext::OpenCodec
+     return 0;
+   }
+ 
+-  if (FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) < 0) {
++  if (FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec, NULL) < 0) {
+     PTRACE(1, m_prefix, "Failed to open H.263 decoder");
+     return false;
+   }
+--- opal-3.10.10~dfsg2.orig/plugins/video/H.264/h264-x264.cxx
++++ opal-3.10.10~dfsg2/plugins/video/H.264/h264-x264.cxx
+@@ -1074,7 +1074,6 @@ class MyDecoder : public PluginCodec<MY_
+       m_context->workaround_bugs = FF_BUG_AUTODETECT;
+       m_context->idct_algo = FF_IDCT_AUTO;
+       m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
+-      m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
+       m_context->flags2 = 
+ #ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
+                           CODEC_FLAG2_DROP_FRAME_TIMECODE |
+@@ -1084,7 +1083,7 @@ class MyDecoder : public PluginCodec<MY_
+       if ((m_picture = FFMPEGLibraryInstance.AvcodecAllocFrame()) == NULL)
+         return false;
+ 
+-      if (FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) < 0)
++      if (FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec, NULL) < 0)
+         return false;
+ 
+       PTRACE(4, MY_CODEC_LOG, "Opened decoder (SVN $Revision: 28048 $)");
+--- opal-3.10.10~dfsg2.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
++++ opal-3.10.10~dfsg2/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+@@ -539,7 +539,7 @@ void MPEG4EncoderContext::ResetBitCounte
+ //
+ 
+ void MPEG4EncoderContext::SetStaticEncodingParams(){
+-    m_avcontext->pix_fmt = PIX_FMT_YUV420P;
++    m_avcontext->pix_fmt = AV_PIX_FMT_YUV420P;
+     m_avcontext->mb_decision = FF_MB_DECISION_SIMPLE;    // high quality off
+     m_avcontext->rtp_payload_size = 750;                 // ffh263 uses 750
+     m_avcontext->rtp_callback = &MPEG4EncoderContext::RtpCallback;
+@@ -595,7 +595,6 @@ void MPEG4EncoderContext::SetStaticEncod
+     m_avcontext->flags|=CODEC_FLAG_AC_PRED;
+     /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
+     m_avcontext->flags|=CODEC_FLAG_4MV;
+-    m_avcontext->flags|=CODEC_FLAG_GMC;
+     m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER;
+ #endif
+     m_avcontext->opaque = this;              // for use in RTP callback
+@@ -710,13 +709,15 @@ bool MPEG4EncoderContext::OpenCodec()
+   if (PTRACE_CHECK(4)) {
+     m_avcontext->debug |= FF_DEBUG_RC;
+     m_avcontext->debug |= FF_DEBUG_PICT_INFO;
+-    m_avcontext->debug |= FF_DEBUG_MV;
++//    m_avcontext->debug |= FF_DEBUG_MV;
+   }
+ #endif
+   
+   SetStaticEncodingParams();
+   SetDynamicEncodingParams(false);    // don't force a restart, it's not open
+-  if (FFMPEGLibraryInstance.AvcodecOpen(m_avcontext, m_avcodec) < 0)
++  AVDictionary *opts = NULL;
++  av_dict_set_int(&opts, "gmc", 1, 0);
++  if (FFMPEGLibraryInstance.AvcodecOpen(m_avcontext, m_avcodec, &opts) < 0)
+   {
+     PTRACE(1, "MPEG4", "Encoder could not be opened");
+     return false;
+@@ -1411,7 +1412,7 @@ bool MPEG4DecoderContext::OpenCodec()
+ 
+     SetStaticDecodingParams();
+     SetDynamicDecodingParams(false);    // don't force a restart, it's not open
+-    if (FFMPEGLibraryInstance.AvcodecOpen(m_avcontext, m_avcodec) < 0) {
++    if (FFMPEGLibraryInstance.AvcodecOpen(m_avcontext, m_avcodec, NULL) < 0) {
+         PTRACE(1, "MPEG4", "Decoder failed to open");
+         return false;
+     }
+--- opal-3.10.10~dfsg2.orig/plugins/video/common/dyna.cxx
++++ opal-3.10.10~dfsg2/plugins/video/common/dyna.cxx
+@@ -291,14 +291,14 @@ AVFrame *FFMPEGLibrary::AvcodecAllocFram
+ {
+   WaitAndSignal m(processLock);
+ 
+-  return avcodec_alloc_frame();
++  return av_frame_alloc();
+ }
+ 
+-int FFMPEGLibrary::AvcodecOpen(AVCodecContext *ctx, AVCodec *codec)
++int FFMPEGLibrary::AvcodecOpen(AVCodecContext *ctx, AVCodec *codec, AVDictionary **options)
+ {
+   WaitAndSignal m(processLock);
+ 
+-  return avcodec_open2(ctx, codec, NULL);
++  return avcodec_open2(ctx, codec, options);
+ }
+ 
+ int FFMPEGLibrary::AvcodecClose(AVCodecContext *ctx)
+@@ -344,7 +344,15 @@ void FFMPEGLibrary::AvSetDimensions(AVCo
+ {
+   WaitAndSignal m(processLock);
+ 
+-  avcodec_set_dimensions(s, width, height);
++  if (av_image_check_size(width, height, 0, s) < 0) {
++    av_log(s, AV_LOG_WARNING, "Failed to set dimensions %d %d\n", width, height);
++    width = height = 0;
++  }
++
++  s->coded_width  = width;
++  s->coded_height = height;
++  s->width        = (width + (1 << av_codec_get_lowres(s)) - 1) >> av_codec_get_lowres(s);
++  s->height       = (height + (1 << av_codec_get_lowres(s)) - 1) >> av_codec_get_lowres(s);
+ }
+ 
+ void FFMPEGLibrary::AvLogSetLevel(int level)
+--- opal-3.10.10~dfsg2.orig/plugins/video/common/dyna.h
++++ opal-3.10.10~dfsg2/plugins/video/common/dyna.h
+@@ -97,7 +97,7 @@ class FFMPEGLibrary
+     AVCodec *AvcodecFindDecoder(enum AVCodecID id);
+     AVCodecContext *AvcodecAllocContext(AVCodec*);
+     AVFrame *AvcodecAllocFrame(void);
+-    int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
++    int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec, AVDictionary **options);
+     int AvcodecClose(AVCodecContext *ctx);
+     int AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict);
+     int AvcodecDecodeVideo(AVCodecContext *ctx, AVFrame *pict, int *got_picture_ptr, BYTE *buf, int buf_size);
+--- opal-3.10.10~dfsg2.orig/plugins/video/common/ffmpeg.h
++++ opal-3.10.10~dfsg2/plugins/video/common/ffmpeg.h
+@@ -47,6 +47,7 @@
+ 
+ extern "C" {
+ #include <libavcodec/avcodec.h>
++#include <libavutil/imgutils.h>
+ // AVPacket was declared in avformat.h before April 2009
+ #if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52, 25, 0)
+ #include <libavformat/avformat.h>

Modified: opal/branches/opal-3.10/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/opal/branches/opal-3.10/debian/patches/series?rev=10699&op=diff
==============================================================================
--- opal/branches/opal-3.10/debian/patches/series	(original)
+++ opal/branches/opal-3.10/debian/patches/series	Mon Jan 11 16:40:08 2016
@@ -2,3 +2,4 @@
 plugins_clean_target.patch
 libav9.patch
 libav10.patch
+ffmpeg_2.9.patch




More information about the Pkg-voip-commits mailing list