summaryrefslogtreecommitdiffstats
path: root/audio/audacity/patches/audacity-1.3.12-ffmpeg.patch
blob: 22146bb1bbffdd4d06b9386d86092f12f0e556f6 (plain)
--- audacity-src-1.3.12-beta.orig/src/FFmpeg.cpp	2010-03-30 04:28:54.000000000 -0700
+++ audacity-src-1.3.12-beta/src/FFmpeg.cpp	2010-10-26 12:22:02.145695409 -0700
@@ -204,7 +204,11 @@
    return ret;
 }
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 68, 0)
+static int ufile_write(URLContext *h, const unsigned char *buf, int size)
+#else
 static int ufile_write(URLContext *h, unsigned char *buf, int size)
+#endif
 {
    return (int) ((wxFile *) h->priv_data)->Write(buf, size);
 }
@@ -356,7 +360,11 @@
          }
          // Otherwize, resort to extension matching if available
          else if (fmt1->extensions) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 60, 0)
+            if (FFmpegLibsInst->av_match_ext(filename, fmt1->extensions)) {
+#else
             if (FFmpegLibsInst->match_ext(filename, fmt1->extensions)) {
+#endif
                score = 50;
             }
          }
@@ -829,7 +837,11 @@
    INITDYN(avformat,av_open_input_file);
    INITDYN(avformat,av_open_input_stream);
    INITDYN(avformat,get_buffer);
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 60, 0)
+   INITDYN(avformat,av_match_ext);
+#else
    INITDYN(avformat,match_ext);
+#endif
 
 #if FFMPEG_STABLE
    INITDYN(avformat,av_init_packet);
--- audacity-src-1.3.12-beta.orig/src/FFmpeg.h	2010-03-30 04:28:54.000000000 -0700
+++ audacity-src-1.3.12-beta/src/FFmpeg.h	2010-10-26 12:23:02.618168997 -0700
@@ -224,7 +224,11 @@
    AVStream*         (*av_new_stream)                 (AVFormatContext *s, int id);
    AVFormatContext*  (*av_alloc_format_context)       (void);
    AVOutputFormat*   (*guess_format)                  (const char *short_name, const char *filename, const char *mime_type);
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 60, 0)
+   int               (*av_match_ext)                  (const char *filename, const char *extensions);
+#else
    int               (*match_ext)                     (const char *filename, const char *extensions);
+#endif
    int               (*av_write_trailer)              (AVFormatContext *s);
    int               (*av_interleaved_write_frame)    (AVFormatContext *s, AVPacket *pkt);
    int               (*av_write_frame)                (AVFormatContext *s, AVPacket *pkt);