forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gst-plugins-libav-1.8.3-ffmpeg-compat.patch
51 lines (46 loc) · 1.87 KB
/
gst-plugins-libav-1.8.3-ffmpeg-compat.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From f48282d442689f7559bfefd70929634a0bde3b84 Mon Sep 17 00:00:00 2001
From: Iain Lane <[email protected]>
Date: Fri, 2 Sep 2016 16:55:46 +0100
Subject: [PATCH] Only use AV_CODEC_ID_WRAPPED_AVFRAME on new enough
libavcodecs
https://bugzilla.gnome.org/show_bug.cgi?id=770753
---
ext/libav/gstavviddec.c | 7 +++++--
ext/libav/gstavvidenc.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index 8aabcb1..71310ec 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -2044,8 +2044,11 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|| in_plugin->id == AV_CODEC_ID_Y41P
|| in_plugin->id == AV_CODEC_ID_012V
|| in_plugin->id == AV_CODEC_ID_YUV4
- || in_plugin->id == AV_CODEC_ID_ZLIB
- || in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME) {
+#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= \
+ AV_VERSION_INT (57,4,0)
+ || in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
+#endif
+ || in_plugin->id == AV_CODEC_ID_ZLIB) {
goto next;
}
diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c
index 9fb7f64..2ec32d8 100644
--- a/ext/libav/gstavvidenc.c
+++ b/ext/libav/gstavvidenc.c
@@ -966,8 +966,11 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
|| in_plugin->id == AV_CODEC_ID_Y41P
|| in_plugin->id == AV_CODEC_ID_012V
|| in_plugin->id == AV_CODEC_ID_YUV4
- || in_plugin->id == AV_CODEC_ID_ZLIB
- || in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME) {
+#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= \
+ AV_VERSION_INT (57,4,0)
+ || in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
+#endif
+ || in_plugin->id == AV_CODEC_ID_ZLIB) {
goto next;
}
--
2.7.4