]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/producer_avformat.c
fix SAMPLE_FMT support for v0.6 and less of libav/ffmpeg
[mlt] / src / modules / avformat / producer_avformat.c
index 8476f90f59cc83c75e619c003eaa9cc178dcd92b..0102b19bd4a06fe4a60a13d67642632ce50946b4 100644 (file)
 #ifdef SWSCALE
 #  include <libswscale/swscale.h>
 #endif
+
 #if LIBAVUTIL_VERSION_INT >= ((50<<16)+(38<<8)+0)
-#include <libavutil/samplefmt.h>
-#elif (LIBAVCODEC_VERSION_INT >= ((51<<16)+(71<<8)+0))
+#  include <libavutil/samplefmt.h>
+#else
+#  define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
+#  define AV_SAMPLE_FMT_S32 SAMPLE_FMT_S32
+#  define AV_SAMPLE_FMT_FLT SAMPLE_FMT_FLT
+#  if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(71<<8)+0))
 const char *avcodec_get_sample_fmt_name(int sample_fmt);
+#  endif
 #endif
+
 #ifdef VDPAU
 #  include <libavcodec/vdpau.h>
 #endif