wok-next diff opal/stuff/patches/opal-3.10.10-ffmpeg2-1.patch @ rev 20709

cdrdao: add patch.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 26 17:09:29 2018 +0300 (2018-05-26)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/opal/stuff/patches/opal-3.10.10-ffmpeg2-1.patch	Sat May 26 17:09:29 2018 +0300
     1.3 @@ -0,0 +1,396 @@
     1.4 +Submitted By:            Igor Živković <contact@igor-zivkovic.from.hr>
     1.5 +Date:                    2013-10-08
     1.6 +Initial Package Version: 3.10.10
     1.7 +Upstream Status:         Unknown
     1.8 +Origin:                  Gentoo
     1.9 +Description:             Fixes building against FFmpeg version >= 2.0.0
    1.10 +
    1.11 +diff -Naur opal-3.10.10.orig/plugins/video/common/dyna.cxx opal-3.10.10/plugins/video/common/dyna.cxx
    1.12 +--- opal-3.10.10.orig/plugins/video/common/dyna.cxx	2013-02-20 03:18:05.000000000 +0100
    1.13 ++++ opal-3.10.10/plugins/video/common/dyna.cxx	2013-10-08 12:57:25.058873513 +0200
    1.14 +@@ -210,7 +210,7 @@
    1.15 + #endif
    1.16 + 
    1.17 + 
    1.18 +-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
    1.19 ++FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
    1.20 + {
    1.21 +   m_codec = codec;
    1.22 +   if (m_codec==CODEC_ID_H264)
    1.23 +@@ -348,12 +348,12 @@
    1.24 +   return true;
    1.25 + }
    1.26 + 
    1.27 +-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
    1.28 ++AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
    1.29 + {
    1.30 +   return Favcodec_find_encoder(id);
    1.31 + }
    1.32 + 
    1.33 +-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
    1.34 ++AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
    1.35 + {
    1.36 +   WaitAndSignal m(processLock);
    1.37 + 
    1.38 +diff -Naur opal-3.10.10.orig/plugins/video/common/dyna.h opal-3.10.10/plugins/video/common/dyna.h
    1.39 +--- opal-3.10.10.orig/plugins/video/common/dyna.h	2013-02-20 03:18:05.000000000 +0100
    1.40 ++++ opal-3.10.10/plugins/video/common/dyna.h	2013-10-08 12:57:25.058873513 +0200
    1.41 +@@ -88,13 +88,13 @@
    1.42 + class FFMPEGLibrary 
    1.43 + {
    1.44 +   public:
    1.45 +-    FFMPEGLibrary(CodecID codec);
    1.46 ++    FFMPEGLibrary(AVCodecID codec);
    1.47 +     ~FFMPEGLibrary();
    1.48 + 
    1.49 +     bool Load();
    1.50 + 
    1.51 +-    AVCodec *AvcodecFindEncoder(enum CodecID id);
    1.52 +-    AVCodec *AvcodecFindDecoder(enum CodecID id);
    1.53 ++    AVCodec *AvcodecFindEncoder(enum AVCodecID id);
    1.54 ++    AVCodec *AvcodecFindDecoder(enum AVCodecID id);
    1.55 +     AVCodecContext *AvcodecAllocContext(void);
    1.56 +     AVFrame *AvcodecAllocFrame(void);
    1.57 +     int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
    1.58 +@@ -117,15 +117,15 @@
    1.59 +     DynaLink m_libAvcodec;
    1.60 +     DynaLink m_libAvutil;
    1.61 + 
    1.62 +-    CodecID m_codec;
    1.63 ++    AVCodecID m_codec;
    1.64 +     char m_codecString[32];
    1.65 + 
    1.66 +     void (*Favcodec_init)(void);
    1.67 +     void (*Fav_init_packet)(AVPacket *pkt);
    1.68 + 
    1.69 +     void (*Favcodec_register_all)(void);
    1.70 +-    AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
    1.71 +-    AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
    1.72 ++    AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id);
    1.73 ++    AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id);
    1.74 +     AVCodecContext *(*Favcodec_alloc_context)(void);
    1.75 +     AVFrame *(*Favcodec_alloc_frame)(void);
    1.76 +     int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
    1.77 +diff -Naur opal-3.10.10.orig/plugins/video/common/ffmpeg/libavcodec/avcodec.h opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h
    1.78 +--- opal-3.10.10.orig/plugins/video/common/ffmpeg/libavcodec/avcodec.h	2013-02-20 03:18:04.000000000 +0100
    1.79 ++++ opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h	2013-10-08 12:57:25.060873488 +0200
    1.80 +@@ -101,7 +101,7 @@
    1.81 +  * 1. no value of a existing codec ID changes (that would break ABI),
    1.82 +  * 2. it is as close as possible to similar codecs.
    1.83 +  */
    1.84 +-enum CodecID {
    1.85 ++enum AVCodecID {
    1.86 +     CODEC_ID_NONE,
    1.87 + 
    1.88 +     /* video codecs */
    1.89 +@@ -1390,7 +1390,7 @@
    1.90 + 
    1.91 +     char codec_name[32];
    1.92 +     enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
    1.93 +-    enum CodecID codec_id; /* see CODEC_ID_xxx */
    1.94 ++    enum AVCodecID codec_id; /* see CODEC_ID_xxx */
    1.95 + 
    1.96 +     /**
    1.97 +      * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
    1.98 +@@ -2843,7 +2843,7 @@
    1.99 +      */
   1.100 +     const char *name;
   1.101 +     enum AVMediaType type;
   1.102 +-    enum CodecID id;
   1.103 ++    enum AVCodecID id;
   1.104 +     int priv_data_size;
   1.105 +     int (*init)(AVCodecContext *);
   1.106 +     int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
   1.107 +@@ -2898,7 +2898,7 @@
   1.108 +      *
   1.109 +      * See CODEC_ID_xxx
   1.110 +      */
   1.111 +-    enum CodecID id;
   1.112 ++    enum AVCodecID id;
   1.113 + 
   1.114 +     /**
   1.115 +      * Supported pixel format.
   1.116 +@@ -3402,10 +3402,10 @@
   1.117 + /**
   1.118 +  * Find a registered encoder with a matching codec ID.
   1.119 +  *
   1.120 +- * @param id CodecID of the requested encoder
   1.121 ++ * @param id AVCodecID of the requested encoder
   1.122 +  * @return An encoder if one was found, NULL otherwise.
   1.123 +  */
   1.124 +-AVCodec *avcodec_find_encoder(enum CodecID id);
   1.125 ++AVCodec *avcodec_find_encoder(enum AVCodecID id);
   1.126 + 
   1.127 + /**
   1.128 +  * Find a registered encoder with the specified name.
   1.129 +@@ -3418,10 +3418,10 @@
   1.130 + /**
   1.131 +  * Find a registered decoder with a matching codec ID.
   1.132 +  *
   1.133 +- * @param id CodecID of the requested decoder
   1.134 ++ * @param id AVCodecID of the requested decoder
   1.135 +  * @return A decoder if one was found, NULL otherwise.
   1.136 +  */
   1.137 +-AVCodec *avcodec_find_decoder(enum CodecID id);
   1.138 ++AVCodec *avcodec_find_decoder(enum AVCodecID id);
   1.139 + 
   1.140 + /**
   1.141 +  * Find a registered decoder with the specified name.
   1.142 +@@ -3822,7 +3822,7 @@
   1.143 +  * @param[in] codec_id the codec
   1.144 +  * @return Number of bits per sample or zero if unknown for the given codec.
   1.145 +  */
   1.146 +-int av_get_bits_per_sample(enum CodecID codec_id);
   1.147 ++int av_get_bits_per_sample(enum AVCodecID codec_id);
   1.148 + 
   1.149 + #if FF_API_OLD_SAMPLE_FMT
   1.150 + /**
   1.151 +diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.cxx opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx
   1.152 +--- opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.cxx	2013-02-20 03:18:03.000000000 +0100
   1.153 ++++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx	2013-10-08 12:57:25.061873475 +0200
   1.154 +@@ -48,6 +48,10 @@
   1.155 + #endif
   1.156 + 
   1.157 + #include "h263-1998.h"
   1.158 ++extern "C"
   1.159 ++{
   1.160 ++#include <libavutil/opt.h>
   1.161 ++}
   1.162 + #include <limits>
   1.163 + #include <iomanip>
   1.164 + #include <stdio.h>
   1.165 +@@ -203,7 +207,7 @@
   1.166 +   PTRACE(4, m_prefix, "Encoder closed");
   1.167 + }
   1.168 + 
   1.169 +-bool H263_Base_EncoderContext::Init(CodecID codecId)
   1.170 ++bool H263_Base_EncoderContext::Init(AVCodecID codecId)
   1.171 + {
   1.172 +   PTRACE(5, m_prefix, "Opening encoder");
   1.173 + 
   1.174 +@@ -317,9 +321,9 @@
   1.175 +     // Level 2+ 
   1.176 +     // works with eyeBeam, signaled via  non-standard "D"
   1.177 +     if (atoi(value) == 1)
   1.178 +-      m_context->flags |= CODEC_FLAG_H263P_UMV; 
   1.179 ++      av_opt_set_int(m_context->priv_data, "umv", 1, 0);
   1.180 +     else
   1.181 +-      m_context->flags &= ~CODEC_FLAG_H263P_UMV; 
   1.182 ++      av_opt_set_int(m_context->priv_data, "umv", 0, 0);
   1.183 +     return;
   1.184 +   }
   1.185 + 
   1.186 +@@ -328,9 +332,9 @@
   1.187 +     // Annex F: Advanced Prediction Mode
   1.188 +     // does not work with eyeBeam
   1.189 +     if (atoi(value) == 1)
   1.190 +-      m_context->flags |= CODEC_FLAG_OBMC; 
   1.191 ++      av_opt_set_int(m_context->priv_data, "obmc", 1, 0);
   1.192 +     else
   1.193 +-      m_context->flags &= ~CODEC_FLAG_OBMC; 
   1.194 ++      av_opt_set_int(m_context->priv_data, "obmc", 0, 0);
   1.195 +     return;
   1.196 +   }
   1.197 + #endif
   1.198 +@@ -360,9 +364,9 @@
   1.199 +     // Annex K: Slice Structure
   1.200 +     // does not work with eyeBeam
   1.201 +     if (atoi(value) != 0)
   1.202 +-      m_context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT; 
   1.203 ++      av_opt_set_int(m_context->priv_data, "structured_slices", 1, 0);
   1.204 +     else
   1.205 +-      m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT; 
   1.206 ++      av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0);
   1.207 +     return;
   1.208 +   }
   1.209 + 
   1.210 +@@ -370,9 +374,9 @@
   1.211 +     // Annex S: Alternative INTER VLC mode
   1.212 +     // does not work with eyeBeam
   1.213 +     if (atoi(value) == 1)
   1.214 +-      m_context->flags |= CODEC_FLAG_H263P_AIV; 
   1.215 ++      av_opt_set_int(m_context->priv_data, "aiv", 1, 0);
   1.216 +     else
   1.217 +-      m_context->flags &= ~CODEC_FLAG_H263P_AIV; 
   1.218 ++      av_opt_set_int(m_context->priv_data, "aiv", 0, 0);
   1.219 +     return;
   1.220 +   }
   1.221 + 
   1.222 +@@ -450,15 +454,6 @@
   1.223 +   PTRACE(5, m_prefix, "qmax set to " << m_context->qmax);
   1.224 +   PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size);
   1.225 + 
   1.226 +-  #define CODEC_TRACER_FLAG(tracer, flag) \
   1.227 +-    PTRACE(4, m_prefix, #flag " is " << ((m_context->flags & flag) ? "enabled" : "disabled"));
   1.228 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_UMV);
   1.229 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_OBMC);
   1.230 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_AC_PRED);
   1.231 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_SLICE_STRUCT)
   1.232 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_LOOP_FILTER);
   1.233 +-  CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_AIV);
   1.234 +-
   1.235 +   return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0;
   1.236 + }
   1.237 + 
   1.238 +@@ -521,7 +516,7 @@
   1.239 + 
   1.240 +     // Need to copy to local buffer to guarantee 16 byte alignment
   1.241 +     memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2);
   1.242 +-    m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE;
   1.243 ++    m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE;
   1.244 + 
   1.245 +     /*
   1.246 +     m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE;
   1.247 +@@ -603,13 +598,13 @@
   1.248 +   m_context->rtp_callback = &H263_RFC2190_EncoderContext::RTPCallBack;
   1.249 +   m_context->opaque = this; // used to separate out packets from different encode threads
   1.250 + 
   1.251 +-  m_context->flags &= ~CODEC_FLAG_H263P_UMV;
   1.252 ++  av_opt_set_int(m_context->priv_data, "umv", 0, 0);
   1.253 +   m_context->flags &= ~CODEC_FLAG_4MV;
   1.254 + #if LIBAVCODEC_RTP_MODE
   1.255 +   m_context->flags &= ~CODEC_FLAG_H263P_AIC;
   1.256 + #endif
   1.257 +-  m_context->flags &= ~CODEC_FLAG_H263P_AIV;
   1.258 +-  m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
   1.259 ++  av_opt_set_int(m_context->priv_data, "aiv", 0, 0);
   1.260 ++  av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0);
   1.261 + 
   1.262 +   return true;
   1.263 + }
   1.264 +diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.h opal-3.10.10/plugins/video/H.263-1998/h263-1998.h
   1.265 +--- opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.h	2013-02-20 03:18:03.000000000 +0100
   1.266 ++++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.h	2013-10-08 12:57:25.062873463 +0200
   1.267 +@@ -115,7 +115,7 @@
   1.268 +     virtual ~H263_Base_EncoderContext();
   1.269 + 
   1.270 +     virtual bool Init() = 0;
   1.271 +-    virtual bool Init(CodecID codecId);
   1.272 ++    virtual bool Init(AVCodecID codecId);
   1.273 + 
   1.274 +     virtual bool SetOptions(const char * const * options);
   1.275 +     virtual void SetOption(const char * option, const char * value);
   1.276 +diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/Makefile.in opal-3.10.10/plugins/video/H.263-1998/Makefile.in
   1.277 +--- opal-3.10.10.orig/plugins/video/H.263-1998/Makefile.in	2013-02-20 03:18:03.000000000 +0100
   1.278 ++++ opal-3.10.10/plugins/video/H.263-1998/Makefile.in	2013-10-08 12:57:25.062873463 +0200
   1.279 +@@ -35,7 +35,7 @@
   1.280 +              $(COMMONDIR)/dyna.cxx
   1.281 + 
   1.282 + CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
   1.283 +-LIBS   += @DL_LIBS@
   1.284 ++LIBS   += @DL_LIBS@ @LIBAVUTIL_LIBS@
   1.285 + 
   1.286 + HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@
   1.287 + ifeq ($(HAVE_LIBAVCODEC_RTP_MODE),yes)
   1.288 +diff -Naur opal-3.10.10.orig/plugins/video/H.264/gpl/h264_helper.cxx opal-3.10.10/plugins/video/H.264/gpl/h264_helper.cxx
   1.289 +--- opal-3.10.10.orig/plugins/video/H.264/gpl/h264_helper.cxx	2013-02-20 03:18:02.000000000 +0100
   1.290 ++++ opal-3.10.10/plugins/video/H.264/gpl/h264_helper.cxx	2013-10-08 12:57:25.062873463 +0200
   1.291 +@@ -27,6 +27,7 @@
   1.292 + #include <fstream>
   1.293 + #include <stdlib.h> 
   1.294 + #include <sys/stat.h>
   1.295 ++#include <unistd.h>
   1.296 + 
   1.297 + #ifdef HAVE_UNISTD_H
   1.298 + #include <unistd.h>
   1.299 +diff -Naur opal-3.10.10.orig/plugins/video/H.264/h264-x264.cxx opal-3.10.10/plugins/video/H.264/h264-x264.cxx
   1.300 +--- opal-3.10.10.orig/plugins/video/H.264/h264-x264.cxx	2013-02-20 03:18:02.000000000 +0100
   1.301 ++++ opal-3.10.10/plugins/video/H.264/h264-x264.cxx	2013-10-08 12:57:25.063873450 +0200
   1.302 +@@ -40,6 +40,9 @@
   1.303 + #include "plugin-config.h"
   1.304 + #endif
   1.305 + 
   1.306 ++#define FF_IDCT_H264 11
   1.307 ++#define CODEC_FLAG2_SKIP_RD 0x00004000
   1.308 ++
   1.309 + #include <codec/opalplugin.hpp>
   1.310 + 
   1.311 + #include "../common/ffmpeg.h"
   1.312 +@@ -1071,13 +1074,10 @@
   1.313 +         return false;
   1.314 + 
   1.315 +       m_context->workaround_bugs = FF_BUG_AUTODETECT;
   1.316 +-      m_context->error_recognition = FF_ER_AGGRESSIVE;
   1.317 +       m_context->idct_algo = FF_IDCT_H264;
   1.318 +       m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
   1.319 +       m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
   1.320 +-      m_context->flags2 = CODEC_FLAG2_BRDO |
   1.321 +-                          CODEC_FLAG2_MEMC_ONLY |
   1.322 +-                          CODEC_FLAG2_DROP_FRAME_TIMECODE |
   1.323 ++      m_context->flags2 = CODEC_FLAG2_DROP_FRAME_TIMECODE |
   1.324 +                           CODEC_FLAG2_SKIP_RD |
   1.325 +                           CODEC_FLAG2_CHUNKS;
   1.326 + 
   1.327 +diff -Naur opal-3.10.10.orig/plugins/video/H.264/shared/x264wrap.cxx opal-3.10.10/plugins/video/H.264/shared/x264wrap.cxx
   1.328 +--- opal-3.10.10.orig/plugins/video/H.264/shared/x264wrap.cxx	2013-02-20 03:18:02.000000000 +0100
   1.329 ++++ opal-3.10.10/plugins/video/H.264/shared/x264wrap.cxx	2013-10-08 12:57:25.064873438 +0200
   1.330 +@@ -33,6 +33,7 @@
   1.331 + 
   1.332 + #include <codec/opalplugin.hpp>
   1.333 + #include <stdio.h>
   1.334 ++#include <unistd.h>
   1.335 + 
   1.336 + #ifdef HAVE_UNISTD_H
   1.337 + #include <unistd.h>
   1.338 +diff -Naur opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/Makefile.in opal-3.10.10/plugins/video/MPEG4-ffmpeg/Makefile.in
   1.339 +--- opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/Makefile.in	2013-02-20 03:18:07.000000000 +0100
   1.340 ++++ opal-3.10.10/plugins/video/MPEG4-ffmpeg/Makefile.in	2013-10-08 12:57:25.064873438 +0200
   1.341 +@@ -31,7 +31,7 @@
   1.342 + SRCS      := mpeg4.cxx $(COMMONDIR)/dyna.cxx
   1.343 + 
   1.344 + CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
   1.345 +-LIBS   += @DL_LIBS@
   1.346 ++LIBS   += @DL_LIBS@ @LIBAVUTIL_LIBS@
   1.347 + 
   1.348 + # Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h>
   1.349 + # Also add libavutil, so ffmpeg headers can #include "log.h".
   1.350 +diff -Naur opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx opal-3.10.10/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
   1.351 +--- opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx	2013-02-20 03:18:07.000000000 +0100
   1.352 ++++ opal-3.10.10/plugins/video/MPEG4-ffmpeg/mpeg4.cxx	2013-10-08 12:57:25.065873425 +0200
   1.353 +@@ -103,6 +103,7 @@
   1.354 + 
   1.355 + #else /* LIBAVCODEC_HAVE_SOURCE_DIR */
   1.356 + #include "../common/ffmpeg.h"
   1.357 ++#include <libavutil/opt.h>
   1.358 + #endif /* LIBAVCODEC_HAVE_SOURCE_DIR */
   1.359 + }
   1.360 + 
   1.361 +@@ -589,17 +590,17 @@
   1.362 +     m_avpicture->quality = m_videoQMin;
   1.363 + 
   1.364 + #ifdef USE_ORIG
   1.365 +-    m_avcontext->flags |= CODEC_FLAG_PART;   // data partitioning
   1.366 ++    av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0);
   1.367 +     m_avcontext->flags |= CODEC_FLAG_4MV;    // 4 motion vectors
   1.368 + #else
   1.369 +     m_avcontext->max_b_frames=0; /*don't use b frames*/
   1.370 +     m_avcontext->flags|=CODEC_FLAG_AC_PRED;
   1.371 +-    m_avcontext->flags|=CODEC_FLAG_H263P_UMV;
   1.372 ++    av_opt_set_int(m_avcontext->priv_data, "umv", 1, 0);
   1.373 +     /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
   1.374 +     m_avcontext->flags|=CODEC_FLAG_4MV;
   1.375 +     m_avcontext->flags|=CODEC_FLAG_GMC;
   1.376 +     m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER;
   1.377 +-    m_avcontext->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
   1.378 ++    av_opt_set_int(m_avcontext->priv_data, "structured_slices", 1, 0);
   1.379 + #endif
   1.380 +     m_avcontext->opaque = this;              // for use in RTP callback
   1.381 + }
   1.382 +@@ -804,7 +805,7 @@
   1.383 +         // Should the next frame be an I-Frame?
   1.384 +         if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0))
   1.385 +         {
   1.386 +-            m_avpicture->pict_type = FF_I_TYPE;
   1.387 ++            m_avpicture->pict_type = AV_PICTURE_TYPE_I;
   1.388 +         }
   1.389 +         else // No IFrame requested, let avcodec decide what to do
   1.390 +         {
   1.391 +@@ -1325,7 +1326,7 @@
   1.392 + 
   1.393 + void MPEG4DecoderContext::SetStaticDecodingParams() {
   1.394 +     m_avcontext->flags |= CODEC_FLAG_4MV; 
   1.395 +-    m_avcontext->flags |= CODEC_FLAG_PART;
   1.396 ++    av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0);
   1.397 +     m_avcontext->workaround_bugs = 0; // no workaround for buggy implementations
   1.398 + }
   1.399 +