Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-base gst-plugins-base
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 641
    • Issues 641
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 80
    • Merge requests 80
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-basegst-plugins-base
  • Issues
  • #725
Closed
Open
Issue created Feb 03, 2020 by Howard@YuHaoLin

glvideomixer: Starting and stopping the pipeline cause memory leak (macOS)

OS: macOS 10.15.2

Platform: iMac (21.5-inch, Late 2012)

GStreamer version: 1.16.2

When I stop and run the pipeline multiple times, each time the memory keeps increasing. The code is shown as below.

#include <stdio.h>
#include <unistd.h>
#include <gst/gst.h>

GstElement *pPipeline;

gboolean replay(gpointer user_data)
{
   gst_element_set_state(pPipeline, GST_STATE_NULL);
   gst_object_unref(pPipeline);

   pPipeline = gst_parse_launch("videotestsrc is-live=true  ! video/x-raw,width=720,height=480,framerate=30/1 ! glvideomixer ! fakesink", NULL);
   gst_element_set_state(pPipeline, GST_STATE_PLAYING);
   return TRUE;
}

int main()
{
    gst_init(NULL, NULL);
    GMainLoop *gloop = g_main_loop_new(0, FALSE);

    pPipeline = gst_parse_launch("videotestsrc is-live=true  ! video/x-raw,width=720,height=480,framerate=30/1 ! glvideomixer ! fakesink", NULL);
    gst_element_set_state(pPipeline, GST_STATE_PLAYING);

    g_timeout_add(3000, replay, NULL);
    g_main_loop_run(gloop);

    return 0;
}

If I replace glvideomixer by compositor, The memory usage is fine.

Linux platform does not have this problem.

Assignee
Assign to
Time tracking