File openmcu-ffmpeg3.patch of Package openmcu

Index: openmcu-ru/conference.cxx
===================================================================
--- openmcu-ru/conference.cxx.orig
+++ openmcu-ru/conference.cxx
@@ -9,10 +9,10 @@
 extern "C" {
 #if USE_SWRESAMPLE
 #include <libswresample/swresample.h>
-#include <libavutil/audioconvert.h>
+#include <libavutil/channel_layout.h>
 #elif USE_AVRESAMPLE
 #include <libavresample/avresample.h>
-#include <libavutil/audioconvert.h>
+#include <libavutil/channel_layout.h>
 #include <libavutil/samplefmt.h>
 #include <libavutil/opt.h>
 #include <libavutil/mem.h>
Index: plugins/H.263-1998.3/h263-1998.cxx
===================================================================
--- plugins/H.263-1998.3/h263-1998.cxx.orig
+++ plugins/H.263-1998.3/h263-1998.cxx
@@ -58,7 +58,7 @@
 #include <stdlib.h>
 
 
-
+#include <libavutil/pixfmt.h>
 #include "h263-1998.h"
 #include <limits.h>
 #include <stdio.h>
@@ -262,7 +262,7 @@ bool H263_Base_EncoderContext::Open(cons
     return false;
   }
 
-  _inputFrame = avcodec_alloc_frame();
+  _inputFrame = av_frame_alloc();
   if (_inputFrame == NULL) {
     TRACE_AND_LOG(tracer, 1, "Failed to allocate frame for encoder");
     return false;
@@ -279,7 +279,7 @@ bool H263_Base_EncoderContext::Open(cons
   _context->me_method = ME_EPZS;
 
   _context->max_b_frames = 0;
-  _context->pix_fmt = PIX_FMT_YUV420P;
+  _context->pix_fmt = AV_PIX_FMT_YUV420P;
 
   // X-Lite does not like Custom Picture frequency clocks...
   _context->time_base.num = 100; 
@@ -1001,7 +1001,7 @@ H263_Base_DecoderContext::H263_Base_Deco
     return;
   }
 
-  _outputFrame = avcodec_alloc_frame();
+  _outputFrame = av_frame_alloc();
   if (_outputFrame == NULL) {
     TRACE_AND_LOG(tracer, 1, "Failed to allocate frame for decoder");
     return;
Index: plugins/G7231/g7231codec.cxx
===================================================================
--- plugins/G7231/g7231codec.cxx.orig
+++ plugins/G7231/g7231codec.cxx
@@ -1,4 +1,5 @@
 #include "g7231codec.h"
+#include <libavutil/frame.h>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -11,7 +12,7 @@ G7231_DecoderContext::G7231_DecoderConte
   if (_context == NULL) 
    { cout << "Failed to allocate context for g7231 decoder\n"; return; }
 
-  _outputFrame = avcodec_alloc_frame();
+  _outputFrame = av_frame_alloc();
   if (_outputFrame == NULL) 
    { cout << "Failed to allocate frame for g7231 decoder\n"; return; }
 
@@ -57,7 +58,7 @@ int G7231_DecoderContext::DecodeFrames(c
   if (_codec == NULL)
    { cout << "Decoder codec g7231 not initialized\n"; return 0; }
 
-  avcodec_get_frame_defaults(_outputFrame);
+  av_frame_unref(_outputFrame);
   _outputFrame->nb_samples  = G7231_SamplesPerFrame;
   memcpy(_pkt.data, src, G7231_BytesPerFrame);
   _pkt.size = G7231_BytesPerFrame;
@@ -88,7 +89,7 @@ G7231_EncoderContext::G7231_EncoderConte
   if (_context == NULL) 
    { cout << "Failed to allocate context for g7231 encoder\n"; return; }
 
-  _inputFrame = avcodec_alloc_frame();
+  _inputFrame = av_frame_alloc();
   if (_inputFrame == NULL) 
    { cout << "Failed to allocate frame for g7231 encoder\n"; return; }
 
@@ -145,7 +146,7 @@ int G7231_EncoderContext::EncodeFrames(c
   if (_codec == NULL)
    { cout << "Encoder codec g7231 not initialized\n"; return 0; }
 
-  avcodec_get_frame_defaults(_inputFrame);
+  av_frame_unref(_inputFrame);
   _inputFrame->nb_samples  = G7231_SamplesPerFrame;
   avcodec_fill_audio_frame(_inputFrame, 1, AV_SAMPLE_FMT_S16,
                                             src, 480, 1);
Index: plugins/H.264_123/h264-x264.cxx
===================================================================
--- plugins/H.264_123/h264-x264.cxx.orig
+++ plugins/H.264_123/h264-x264.cxx
@@ -220,7 +220,7 @@ H264DecoderContext::H264DecoderContext()
     return;
   }
 
-  _outputFrame = avcodec_alloc_frame();
+  _outputFrame = av_frame_alloc();
   if (_outputFrame == NULL) {
     cout << "H264\tDecoder\tFailed to allocate frame for encoder\n";
     return;
Index: plugins/VP8-WebM/vp8_webm.cxx
===================================================================
--- plugins/VP8-WebM/vp8_webm.cxx.orig
+++ plugins/VP8-WebM/vp8_webm.cxx
@@ -820,7 +820,7 @@ class VP8DecoderFFmpeg : public PluginVi
         return false;
       }
 
-      m_outputFrame = avcodec_alloc_frame();
+      m_outputFrame = av_frame_alloc();
       if (m_outputFrame == NULL)
       {
         return false;
openSUSE Build Service is sponsored by