changeset 9657:d276be9fcbf7 jdk-9+113

8152722: Crash when loading files in SW mode Reviewed-by: ddehaven
author almatvee
date Fri, 01 Apr 2016 17:05:09 -0700
parents 718367563b25
children 0e2c2653ec6d 5fb95ea38421
files modules/media/src/main/native/jfxmedia/platform/gstreamer/GstVideoFrame.cpp
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/media/src/main/native/jfxmedia/platform/gstreamer/GstVideoFrame.cpp	Fri Apr 01 15:28:59 2016 -0700
+++ b/modules/media/src/main/native/jfxmedia/platform/gstreamer/GstVideoFrame.cpp	Fri Apr 01 17:05:09 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -512,11 +512,9 @@
     GST_BUFFER_OFFSET(destBuffer) = GST_BUFFER_OFFSET(m_pBuffer);
     GST_BUFFER_DURATION(destBuffer) = GST_BUFFER_DURATION(m_pBuffer);
 
-    if (!gst_buffer_map(m_pBuffer, &info, GST_MAP_WRITE)) {
+    if (!gst_buffer_map(destBuffer, &info, GST_MAP_WRITE)) {
         // INLINE - gst_buffer_unref()
         gst_buffer_unref(destBuffer);
-        // INLINE - gst_sample_unref()
-        gst_sample_unref(destSample);
         return NULL;
     }