aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPooja Prajod2015-05-05 05:50:20 -0500
committerKarthik Ramanan2015-05-05 07:30:06 -0500
commit53bc780bbf5be2da9c7f775d48b10b7e216ae688 (patch)
treeff11e95544fac45e4291f12180e1a85583f784a7
parent08830f046fc0db27869d9c8d2e48494bf2e4d2ba (diff)
downloadgstreamer1-0-plugins-bad-53bc780bbf5be2da9c7f775d48b10b7e216ae688.tar.gz
gstreamer1-0-plugins-bad-53bc780bbf5be2da9c7f775d48b10b7e216ae688.tar.xz
gstreamer1-0-plugins-bad-53bc780bbf5be2da9c7f775d48b10b7e216ae688.zip
Solve segmentation fault in drm_handle_format
The format info as part of display is unnecessary. This patch removes the code which for storing format info. Since format info was stored in an array, there will not be overflow pertaining to this. Signed-off-by: Pooja Prajod <a0132412@ti.com>
-rw-r--r--ext/wayland/gstwaylandsink.c8
-rw-r--r--ext/wayland/gstwaylandsink.h3
2 files changed, 0 insertions, 11 deletions
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
index 93a6bda..e450296 100644
--- a/ext/wayland/gstwaylandsink.c
+++ b/ext/wayland/gstwaylandsink.c
@@ -428,15 +428,7 @@ drm_handle_device (void *data, struct wl_drm *drm, const char *device)
428static void 428static void
429drm_handle_format (void *data, struct wl_drm *drm, uint32_t format) 429drm_handle_format (void *data, struct wl_drm *drm, uint32_t format)
430{ 430{
431 struct display *d = data;
432 GST_DEBUG ("got format: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format)); 431 GST_DEBUG ("got format: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format));
433 if (d->drm_format_count < 50) {
434 d->drm_formats[d->drm_format_count++] = format;
435 } else {
436 d->drm_formats[d->drm_format_count++] = format;
437 GST_WARNING ("drm_handle_formats (no room for more formats): %"
438 GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format));
439 }
440} 432}
441 433
442static void 434static void
diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h
index fee7c1c..d0ddf49 100644
--- a/ext/wayland/gstwaylandsink.h
+++ b/ext/wayland/gstwaylandsink.h
@@ -88,9 +88,6 @@ struct display
88 struct wl_drm *drm; 88 struct wl_drm *drm;
89 uint32_t formats; 89 uint32_t formats;
90 90
91 uint32_t drm_formats[50];
92 int drm_format_count;
93
94 struct wl_list input_list; 91 struct wl_list input_list;
95 int seat_version; 92 int seat_version;
96 uint32_t serial; 93 uint32_t serial;