Alex Henrie : winegstreamer: If no audio media type was allocated, don' t free it.

Alexandre Julliard julliard at winehq.org
Wed Nov 16 17:39:18 CST 2016


Module: wine
Branch: master
Commit: 474d5be546811f0d1b885976480bd03bd338d61e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=474d5be546811f0d1b885976480bd03bd338d61e

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Tue Nov 15 22:41:50 2016 -0700

winegstreamer: If no audio media type was allocated, don't free it.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/gstdemux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 892385f..65366ce 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -266,7 +266,8 @@ static gboolean accept_caps_sink(GstPad *pad, GstCaps *caps)
             return FALSE;
         }
         ret = amt_from_gst_caps_audio(caps, &amt);
-        FreeMediaType(&amt);
+        if (ret)
+            FreeMediaType(&amt);
         TRACE("+%i\n", ret);
         return ret;
     } else if (!strcmp(typename, "video/x-raw")) {




More information about the wine-cvs mailing list