]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/filter_avresample.c
fix QObject::connect of type QTextCursor errors
[mlt] / src / modules / avformat / filter_avresample.c
index 340d22512350b6e6f905268ff1fddc7c415d0b49..65ea354e9ea6862d5c8aa99785a2f7b9ad8c0b16 100644 (file)
 
 // ffmpeg Header files
 #include <libavformat/avformat.h>
+#if LIBAVUTIL_VERSION_INT >= ((50<<16)+(38<<8)+0)
+#  include <libavutil/samplefmt.h>
+#else
+#  define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
+#endif
 
 /** Get the audio.
 */
@@ -79,7 +84,7 @@ static int resample_get_audio( mlt_frame frame, void **buffer, mlt_audio_format
                        // Create the resampler
 #if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(15<<8)+0))
                        resample = av_audio_resample_init( *channels, *channels, output_rate, *frequency,
-                               SAMPLE_FMT_S16, SAMPLE_FMT_S16, 16, 10, 0, 0.8 );
+                               AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16, 16, 10, 0, 0.8 );
 #else
                        resample = audio_resample_init( *channels, *channels, output_rate, *frequency );
 #endif