avaudenc/dec: Allow compilation against ffmpeg < 3.2 again
authorSebastian Dröge <sebastian@centricular.com>
Wed, 26 Oct 2016 20:29:18 +0000 (23:29 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 26 Oct 2016 20:29:40 +0000 (23:29 +0300)
ext/libav/gstavauddec.c
ext/libav/gstavaudenc.c

index de173a6..ef63f53 100644 (file)
@@ -878,7 +878,11 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
         (in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
             in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
         (in_plugin->id >= AV_CODEC_ID_PCM_S8_PLANAR &&
+#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,54,0)
             in_plugin->id <= AV_CODEC_ID_PCM_S64BE)) {
+#else
+            in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
+#endif
       goto next;
     }
 
index ea270be..f190ef9 100644 (file)
@@ -788,7 +788,11 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
         (in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
             in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
         (in_plugin->id >= AV_CODEC_ID_PCM_S8_PLANAR &&
+#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,54,0)
             in_plugin->id <= AV_CODEC_ID_PCM_S64BE)) {
+#else
+            in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
+#endif
       goto next;
     }