Commit e1b41168 authored by Iain Lane's avatar Iain Lane Committed by Sebastian Dröge

avaudenc/dec: Don't do range comparisons against AV_CODEC_ID_PCM_S16BE_PLANAR for < 3.0

Prior to ffmpeg 3.0, this constant had a specified value. Excluding all
plugins in a range bounded by this value was throwing out plugins that
we want to keep.

Instead switch to enumerating the values to exclude, for < 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=778283
parent b12f6fde
......@@ -877,11 +877,22 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
if (in_plugin->id == AV_CODEC_ID_PCM_S16LE_PLANAR ||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
/* ffmpeg 3.0 */
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,0,0)
(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
#else
in_plugin->id == AV_CODEC_ID_PCM_S8_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR) {
#endif
goto next;
}
......
......@@ -787,11 +787,22 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
if (in_plugin->id == AV_CODEC_ID_PCM_S16LE_PLANAR ||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
/* ffmpeg 3.0 */
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,0,0)
(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
#else
in_plugin->id == AV_CODEC_ID_PCM_S8_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR) {
#endif
goto next;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment