fix compilation issues, cfr. https://code.google.com/archive/p/pyffmpeg/issues/44
author: Kenneth Hoste (HPC-UGent)
--- pyffmpeg-2.1beta/pyffmpeg.pyx.orig	2011-01-12 16:49:19.000000000 +0100
+++ pyffmpeg-2.1beta/pyffmpeg.pyx	2016-02-17 14:09:02.007382083 +0100
@@ -183,7 +183,6 @@
 #        int height
 #        int pix_fmt
 #        int frame_number
-#        int hurry_up
 #        int skip_idct
 #        int skip_frame
 
@@ -220,7 +219,6 @@
         float     b_quant_factor
         int     rc_strategy
         int     b_frame_strategy
-        int     hurry_up
         int     rtp_mode
         int     rtp_payload_size
         int     mv_bits
@@ -370,12 +368,12 @@
         int skip_loop_filter
 
 
-    enum CodecType:
-        CODEC_TYPE_UNKNOWN = -1
-        CODEC_TYPE_VIDEO = 0
-        CODEC_TYPE_AUDIO = 1
-        CODEC_TYPE_DATA = 2
-        CODEC_TYPE_SUBTITLE = 3
+    enum AVMediaType:
+        AVMEDIA_TYPE_UNKNOWN = -1
+        AVMEDIA_TYPE_VIDEO = 0
+        AVMEDIA_TYPE_AUDIO = 1
+        AVMEDIA_TYPE_DATA = 2
+        AVMEDIA_TYPE_SUBTITLE = 3
 
     struct AVCodec:
         char *name
@@ -620,7 +618,7 @@
     AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened)
     AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened,int * score)
     AVFormatContext *  avformat_alloc_context()
-    AVOutputFormat *guess_format(char *short_name, char *filename,char *mime_type)
+    AVOutputFormat *av_guess_format(char *short_name, char *filename,char *mime_type)
 
 cdef __registered
 __registered = 0
@@ -703,6 +701,7 @@
 
 
 def py_av_register_all():
+    global __registered
     if __registered:
         return
     __registered = 1
@@ -761,10 +760,10 @@
 ###############################################################################
 ## Some common settings
 ###############################################################################
-TS_AUDIOVIDEO={'video1':(CODEC_TYPE_VIDEO, -1,  {}), 'audio1':(CODEC_TYPE_AUDIO, -1, {})}
-TS_AUDIO={ 'audio1':(CODEC_TYPE_AUDIO, -1, {})}
-TS_VIDEO={ 'video1':(CODEC_TYPE_VIDEO, -1, {})}
-TS_VIDEO_PIL={ 'video1':(CODEC_TYPE_VIDEO, -1, {'outputmode':OUTPUTMODE_PIL})}
+TS_AUDIOVIDEO={'video1':(AVMEDIA_TYPE_VIDEO, -1,  {}), 'audio1':(AVMEDIA_TYPE_AUDIO, -1, {})}
+TS_AUDIO={ 'audio1':(AVMEDIA_TYPE_AUDIO, -1, {})}
+TS_VIDEO={ 'video1':(AVMEDIA_TYPE_VIDEO, -1, {})}
+TS_VIDEO_PIL={ 'video1':(AVMEDIA_TYPE_VIDEO, -1, {'outputmode':OUTPUTMODE_PIL})}
 
 
 
@@ -805,13 +804,13 @@
  #   self.prepacket=<AVPacket *>None
 #   self.packet=&self.packetbufa
 
-    def __new__(self):
+    def __cinit__(self):
         pass
 
     def dump(self):
         pass
 
-    def open(self,char *filename, track_selector={'video1':(CODEC_TYPE_VIDEO, -1), 'audio1':(CODEC_TYPE_AUDIO, -1)}):
+    def open(self,char *filename, track_selector={'video1':(AVMEDIA_TYPE_VIDEO, -1), 'audio1':(AVMEDIA_TYPE_AUDIO, -1)}):
         pass
 
     def close(self):
@@ -906,7 +905,6 @@
             skip_frame
             skip_idct
             skip_loop_filter
-            hurry_up
             dct_algo
             idct_algo
 
@@ -916,7 +914,7 @@
         self.observer=None
         self.support_truncated=support_truncated
         for k in args.keys():
-            if k not in [ "skip_frame", "skip_loop_filter", "skip_idct", "hurry_up", "hurry_mode", "dct_algo", "idct_algo", "check_start" ,"check_end"]:
+            if k not in [ "skip_frame", "skip_loop_filter", "skip_idct", "hurry_mode", "dct_algo", "idct_algo", "check_start" ,"check_end"]:
                 sys.stderr.write("warning unsupported arguments in stream initialization :"+k+"\n")
         if self.Codec == NULL:
             raise IOError("Unable to get decoder")
@@ -924,7 +922,6 @@
             self.CodecCtx.flags = self.CodecCtx.flags | CODEC_FLAG_TRUNCATED
         avcodec_open(self.CodecCtx, self.Codec)
         if args.has_key("hurry_mode"):
-            self.CodecCtx.hurry_up=2
             self.CodecCtx.skip_loop_filter=32
             self.CodecCtx.skip_frame=32
             self.CodecCtx.skip_idct=32
@@ -934,8 +931,6 @@
             self.CodecCtx.skip_idct=args["skip_idct"]
         if args.has_key("skip_loop_filter"):
             self.CodecCtx.skip_loop_filter=args["skip_loop_filter"]
-        if args.has_key("hurry_up"):
-            self.CodecCtx.skip_loop_filter=args["hurry_up"]
         if args.has_key("dct_algo"):
             self.CodecCtx.dct_algo=args["dct_algo"]
         if args.has_key("idct_algo"):
@@ -1389,7 +1384,6 @@
             skip_frame
             skip_idct
             skip_loop_filter
-            hurry_up
             dct_algo
             idct_algo
 
@@ -1668,12 +1662,10 @@
         if (b) :
             self.CodecCtx.skip_idct = AVDISCARD_BIDIR
             self.CodecCtx.skip_frame = AVDISCARD_BIDIR
-            self.CodecCtx.hurry_up = 1
             self.hurried_frames = 0
         else:
             self.CodecCtx.skip_idct = 0
             self.CodecCtx.skip_frame = 0
-            self.CodecCtx.hurry_up = 0
 
     ########################################
     ###
@@ -1832,7 +1824,7 @@
     cdef int with_readahead
     cdef unsigned long long int seek_before_security_interval
 
-    def __new__(self,with_readahead=True,seek_before=4000):
+    def __cinit__(self,with_readahead=True,seek_before=4000):
         self.filename = None
         self.tracks=[]
         self.ctracks=NULL
@@ -1902,7 +1894,7 @@
 
         if (mode=="w"):
             raise Exception,"Not yet supported sorry"
-            self.FormatCtx.oformat = guess_format(NULL, filename_, NULL);
+            self.FormatCtx.oformat = av_guess_format(NULL, filename_, NULL);
             if (self.FormatCtx.oformat==NULL):
                 raise Exception, "Unable to find output format for %s\n"
 
@@ -1960,7 +1952,7 @@
         cdef  AVFormatContext * oc
         oc = avformat_alloc_context()
         # Guess file format with file extention
-        oc.oformat = guess_format(NULL, filename_, NULL);
+        oc.oformat = av_guess_format(NULL, filename_, NULL);
         if (oc.oformat==NULL):
             raise Exception, "Unable to find output format for %s\n"
         # Alloc priv_data for format
@@ -2038,7 +2030,7 @@
                 raise IOError("Unable to find specified Track")
 
             CodecCtx = self.FormatCtx.streams[trackno].codec
-            if (s[0]==CODEC_TYPE_VIDEO):
+            if (s[0]==AVMEDIA_TYPE_VIDEO):
                 try:
                     vt=VideoTrack()
                 except:
@@ -2048,7 +2040,7 @@
                 vt.init0(self,trackno,  CodecCtx) ## here we are passing cpointers so we do a C call
                 vt.init(**s[2])## here we do a python call
                 self.tracks.append(vt)
-            elif (s[0]==CODEC_TYPE_AUDIO):
+            elif (s[0]==AVMEDIA_TYPE_AUDIO):
                 try:
                     at=AudioTrack()
                 except:
@@ -2171,11 +2163,11 @@
                 ## I don't know why it seems that Windows Cython have problem calling the correct virtual function
                 ##
                 ##
-                if ct.CodecCtx.codec_type==CODEC_TYPE_VIDEO:
+                if ct.CodecCtx.codec_type==AVMEDIA_TYPE_VIDEO:
                     processed=True
                     vt=ct
                     vt.process_packet(self.packet)
-                elif ct.CodecCtx.codec_type==CODEC_TYPE_AUDIO:
+                elif ct.CodecCtx.codec_type==AVMEDIA_TYPE_AUDIO:
                     processed=True
                     at=ct
                     at.process_packet(self.packet)
