diff --git a/dom/media/gstreamer/GStreamerFunctionList.h b/dom/media/gstreamer/GStreamerFunctionList.h index ebdeeb6aa3ee..75f352ec0dec 100644 --- a/dom/media/gstreamer/GStreamerFunctionList.h +++ b/dom/media/gstreamer/GStreamerFunctionList.h @@ -48,6 +48,7 @@ GST_FUNC(LIBGSTREAMER, gst_element_set_state) GST_FUNC(LIBGSTREAMER, gst_flow_get_name) GST_FUNC(LIBGSTREAMER, gst_init) GST_FUNC(LIBGSTREAMER, gst_init_check) +GST_FUNC(LIBGSTREAMER, gst_iterator_free) GST_FUNC(LIBGSTREAMER, gst_iterator_next) GST_FUNC(LIBGSTREAMER, gst_message_parse_error) GST_FUNC(LIBGSTREAMER, gst_message_type_get_name) diff --git a/dom/media/gstreamer/GStreamerReader.cpp b/dom/media/gstreamer/GStreamerReader.cpp index 2221ef9c137d..8cc4953f573f 100644 --- a/dom/media/gstreamer/GStreamerReader.cpp +++ b/dom/media/gstreamer/GStreamerReader.cpp @@ -607,6 +607,8 @@ nsresult GStreamerReader::CheckSupportedFormats() } } + gst_iterator_free(it); + return unsupported ? NS_ERROR_FAILURE : NS_OK; }