File uosnes-ffmpeg2.patch of Package uosnes

Index: uosnes-20100825/src/Makefile.am
===================================================================
--- uosnes-20100825.orig/src/Makefile.am
+++ uosnes-20100825/src/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS =\
  -I${top_srcdir}/snes\
  -I${top_srcdir}/snes/filter\
  -I${top_srcdir}/common\
- -I${top_srcdir}/ffmpeg\
+ -I${includedir}/ffmpeg\
  @UOSNES_PORT_INCLUDES@\
  @PORT_CPPFLAGS@ @UOSNES_CPPFLAGS@ @SNES_CPPFLAGS@
 
Index: uosnes-20100825/src/uosnes_avcodec.cpp
===================================================================
--- uosnes-20100825.orig/src/uosnes_avcodec.cpp
+++ uosnes-20100825/src/uosnes_avcodec.cpp
@@ -36,7 +36,7 @@ bool8 movie_open (const char *filename)
   if(!init)
     {
       /* must be called before using avcodec lib */
-      avcodec_init();
+//      avcodec_init();
 
       /* register all the codecs */
       avcodec_register_all();
@@ -52,7 +52,7 @@ bool8 movie_open (const char *filename)
 
   frame_rate = Memory.ROMFramesPerSecond;
 
-  c = avcodec_alloc_context();
+  c = avcodec_alloc_context3(codec);
 
   c->bit_rate = 400000;
   c->width = 256;
@@ -64,7 +64,7 @@ bool8 movie_open (const char *filename)
   c->pix_fmt = (enum PixelFormat)PixelFormat;
 
   /* open it */
-  if (avcodec_open(c, codec) < 0 || !(fp = fopen(filename, "wb")))
+  if (avcodec_open2(c, codec, NULL) < 0 || !(fp = fopen(filename, "wb")))
     {
       av_free(c);
       c = NULL;
openSUSE Build Service is sponsored by