summaryrefslogtreecommitdiffstats
path: root/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-28 14:00:09 -0500
committertrav90 <travawine@protonmail.ch>2018-04-28 14:20:52 -0500
commit29c293b100e046eaf82ceadbf676c0226b0e9e82 (patch)
tree43d8fb4d1c8a79952a6dbf1ed87be8e1cbbfc246 /dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
parentb45f40ff9b410e919bb299cdf4da68acdb06ff2b (diff)
downloadUXP-29c293b100e046eaf82ceadbf676c0226b0e9e82.tar
UXP-29c293b100e046eaf82ceadbf676c0226b0e9e82.tar.gz
UXP-29c293b100e046eaf82ceadbf676c0226b0e9e82.tar.lz
UXP-29c293b100e046eaf82ceadbf676c0226b0e9e82.tar.xz
UXP-29c293b100e046eaf82ceadbf676c0226b0e9e82.zip
Add support for libavcodec 58/FFmpeg 4.0
Diffstat (limited to 'dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp')
-rw-r--r--dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
index f3dc00ad7..6302882a6 100644
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
@@ -69,12 +69,14 @@ FFmpegLibWrapper::Link()
AV_FUNC_55 = 1 << 2,
AV_FUNC_56 = 1 << 3,
AV_FUNC_57 = 1 << 4,
+ AV_FUNC_58 = 1 << 5,
AV_FUNC_AVUTIL_53 = AV_FUNC_53 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_54 = AV_FUNC_54 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_55 = AV_FUNC_55 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_56 = AV_FUNC_56 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_57 = AV_FUNC_57 | AV_FUNC_AVUTIL_MASK,
- AV_FUNC_AVCODEC_ALL = AV_FUNC_53 | AV_FUNC_54 | AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57,
+ AV_FUNC_AVUTIL_58 = AV_FUNC_58 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVCODEC_ALL = AV_FUNC_53 | AV_FUNC_54 | AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57 | AV_FUNC_58,
AV_FUNC_AVUTIL_ALL = AV_FUNC_AVCODEC_ALL | AV_FUNC_AVUTIL_MASK
};
@@ -94,6 +96,9 @@ FFmpegLibWrapper::Link()
case 57:
version = AV_FUNC_57;
break;
+ case 58:
+ version = AV_FUNC_58;
+ break;
default:
FFMPEG_LOG("Unknown avcodec version");
Unlink();
@@ -142,9 +147,9 @@ FFmpegLibWrapper::Link()
AV_FUNC(av_log_set_level, AV_FUNC_AVUTIL_ALL)
AV_FUNC(av_malloc, AV_FUNC_AVUTIL_ALL)
AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL)
- AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
- AV_FUNC(av_frame_free, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
- AV_FUNC(av_frame_unref, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
+ AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
+ AV_FUNC(av_frame_free, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
+ AV_FUNC(av_frame_unref, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
AV_FUNC_OPTION(av_frame_get_colorspace, AV_FUNC_AVUTIL_ALL)
#undef AV_FUNC
#undef AV_FUNC_OPTION
@@ -175,4 +180,4 @@ FFmpegLibWrapper::Unlink()
PodZero(this);
}
-} // namespace mozilla \ No newline at end of file
+} // namespace mozilla