SampleFormat  renamed to AVSampleFormat and ditto for the enum constants.

---
 filebase.C |   29 ++++++++++++++++++++++++++++-
 filebase.h |    4 ++++
 2 files changed, 32 insertions(+), 1 deletion(-)
---
diff -uprN a/cinelerra/filebase.C b/cinelerra/filebase.C
--- a/cinelerra/filebase.C      2012-12-03 21:13:46.000000000 +0530
+++ b/cinelerra/filebase.C      2013-01-16 01:36:50.000000000 +0530
@@ -136,17 +136,28 @@ void FileBase::append_history(float **ne
         decode_end += len;
 }

-
+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
 void FileBase::append_history(const void *in, enum SampleFormat
format, int offset, int len)
+#else
+void FileBase::append_history(const void *in, enum AVSampleFormat
format, int offset, int len)
+#endif
 {
   switch (format) {
   default:
+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_NONE:
+#else
+  case AV_SAMPLE_FMT_NONE:
+#endif
     /* uhhhh..... */
     pad_history(len);
     break;

+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_U8:
+#else
+  case AV_SAMPLE_FMT_U8:
+#endif
     {
       /* unsigned 8 bits */
       allocate_history(len);
@@ -163,7 +174,11 @@ void FileBase::append_history(const void
       break;
     }

+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_S16:
+#else
+  case AV_SAMPLE_FMT_S16:
+#endif
     {
       /* signed 16 bits */
       allocate_history(len);
@@ -180,7 +195,11 @@ void FileBase::append_history(const void
       break;
     }

+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_S32:
+#else
+  case AV_SAMPLE_FMT_S32:
+#endif
     {
       /* signed 32 bits */
       allocate_history(len);
@@ -197,7 +216,11 @@ void FileBase::append_history(const void
       break;
     }

+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_FLT:
+#else
+  case AV_SAMPLE_FMT_FLT:
+#endif
     {
       /* float */
       allocate_history(len);
@@ -214,7 +237,11 @@ void FileBase::append_history(const void
       break;
     }

+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
   case SAMPLE_FMT_DBL:
+#else
+  case AV_SAMPLE_FMT_DBL:
+#endif
     {
       /* double */
       allocate_history(len);
diff -uprN a/cinelerra/filebase.h b/cinelerra/filebase.h
--- a/cinelerra/filebase.h      2012-12-03 21:13:46.000000000 +0530
+++ b/cinelerra/filebase.h      2013-01-16 01:29:50.000000000 +0530
@@ -117,7 +117,11 @@ public:
 // contiguous float
         void append_history(float **new_data, int offset, int len);
 // Interleaved
+#if LIBAVCODEC_VERSION_INT < ((53<<16)+(35<<8)+0)
         void append_history(const void *new_data, enum SampleFormat
format, int offset, int samples);
+#else
+        void append_history(const void *new_data, enum AVSampleFormat
format, int offset, int samples);
+#endif

         void pad_history(int len);
         void read_history(double *dst,
_______________________________________________
Cinelerra mailing list
[email protected]
https://lists.skolelinux.org/listinfo/cinelerra

Reply via email to