diff options
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch')
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch new file mode 100644 index 00000000..2d5389d9 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
3 | Date: Tue, 9 Feb 2016 14:00:00 -0800 | ||
4 | Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc | ||
5 | |||
6 | For GStreamer functions declared with G_GNUC_NULL_TERMINATED, | ||
7 | ie __attribute__((__sentinel__)), gcc will generate a warning if the | ||
8 | last parameter passed to the function is not NULL (where a valid NULL | ||
9 | in this context is defined as zero with any pointer type). | ||
10 | |||
11 | The C callers to such functions within gst-plugins-bad use the C NULL | ||
12 | definition (ie ((void*)0)), which is a valid sentinel. | ||
13 | |||
14 | However the C++ NULL definition (ie 0L), is not a valid sentinel | ||
15 | without an explicit cast to a pointer type. | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
20 | --- | ||
21 | sys/decklink/gstdecklink.cpp | 10 +++++----- | ||
22 | sys/decklink/gstdecklinkaudiosrc.cpp | 2 +- | ||
23 | sys/decklink/gstdecklinkvideosink.cpp | 2 +- | ||
24 | 3 files changed, 7 insertions(+), 7 deletions(-) | ||
25 | |||
26 | Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp | ||
27 | =================================================================== | ||
28 | --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp | ||
29 | +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp | ||
30 | @@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck | ||
31 | "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, | ||
32 | "interlace-mode", G_TYPE_STRING, | ||
33 | mode->interlaced ? "interleaved" : "progressive", | ||
34 | - "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); | ||
35 | + "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL); | ||
36 | |||
37 | if (input && mode->interlaced) { | ||
38 | if (mode->tff) | ||
39 | @@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck | ||
40 | case bmdFormat8BitYUV: /* '2vuy' */ | ||
41 | gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", | ||
42 | "colorimetry", G_TYPE_STRING, mode->colorimetry, | ||
43 | - "chroma-site", G_TYPE_STRING, "mpeg2", NULL); | ||
44 | + "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL); | ||
45 | break; | ||
46 | case bmdFormat10BitYUV: /* 'v210' */ | ||
47 | - gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); | ||
48 | + gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL); | ||
49 | break; | ||
50 | case bmdFormat8BitARGB: /* 'ARGB' */ | ||
51 | - gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); | ||
52 | + gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL); | ||
53 | break; | ||
54 | case bmdFormat8BitBGRA: /* 'BGRA' */ | ||
55 | - gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); | ||
56 | + gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL); | ||
57 | break; | ||
58 | case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ | ||
59 | case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ | ||
60 | Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp | ||
61 | =================================================================== | ||
62 | --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp | ||
63 | +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp | ||
64 | @@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase | ||
65 | g_mutex_unlock (&self->input->lock); | ||
66 | |||
67 | if (videosrc) { | ||
68 | - g_object_get (videosrc, "connection", &vconn, NULL); | ||
69 | + g_object_get (videosrc, "connection", &vconn, (void *) NULL); | ||
70 | gst_object_unref (videosrc); | ||
71 | |||
72 | switch (vconn) { | ||
73 | Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp | ||
74 | =================================================================== | ||
75 | --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp | ||
76 | +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp | ||
77 | @@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu | ||
78 | gpointer user_data) | ||
79 | { | ||
80 | gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, | ||
81 | - G_MAXINT, 1, NULL); | ||
82 | + G_MAXINT, 1, (void *) NULL); | ||
83 | |||
84 | return TRUE; | ||
85 | } | ||