[0.11] gst-plugins-good: Don't crash on empty laces

Vincent Penquerc'h vincent at kemper.freedesktop.org
Tue Jan 24 06:12:27 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: b780639b2cc6dd9e61f18eadb9f0967aa2f1c3da
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=b780639b2cc6dd9e61f18eadb9f0967aa2f1c3da

Author: Matej Knopp <matej.knopp at gmail.com>
Date:   Thu Dec  1 15:49:40 2011 +0100

Don't crash on empty laces

https://bugzilla.gnome.org/show_bug.cgi?id=665224

---

 gst/matroska/matroska-demux.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 1eed160..daace80 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -2903,6 +2903,11 @@ gst_matroska_demux_check_subtitle_buffer (GstElement * element,
 
   data = gst_buffer_map (*buf, &size, NULL, GST_MAP_READ);
 
+  if (!data) {
+    gst_buffer_unmap (*buf, data, -1);
+    return GST_FLOW_OK;
+  }
+
   if (!sub_stream->invalid_utf8) {
     if (g_utf8_validate (data, size, NULL)) {
       goto next;



More information about the gstreamer-commits mailing list