[Bug 755770] New: decodebin: Free unlinked chains at time of switching chains

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Sep 28 21:46:44 PDT 2015


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

            Bug ID: 755770
           Summary: decodebin: Free unlinked chains at time of switching
                    chains
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: kameyameha at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 312342
  --> https://bugzilla.gnome.org/attachment.cgi?id=312342&action=edit
Patch to free hidden groups at the time of switching

I am running below pipeline:

gst-launch-1.0 playbin
uri=https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8

I am using a h/w based video decoder.

At the time of switching pads, hlsdemux sends an EOS on older pad and unlinks
it.
But my h/w based video decoder was not getting any information that it should
close the underlying device apart from EOS.

Upon investigation, I came to gstdecodebin2.c


>>>>>>>> gst_decode_chain_start_free_hidden_groups_thread (chain);
        gst_decode_group_hide (chain->active_group);
        chain->old_groups =
            g_list_prepend (chain->old_groups, chain->active_group);
        GST_DEBUG_OBJECT (dbin, "Switching to next group %p",
            chain->next_groups->data);
        chain->active_group = chain->next_groups->data;
        chain->next_groups =
            g_list_delete_link (chain->next_groups, chain->next_groups);
        *switched = TRUE;
        chain->drained = FALSE;

In this code, it first starts a thread to free up old_group and then update the
old_group itself (which should be in reverse order, that first update the
old_group and then call a function to free it)

Due to this, old_group was freed only at the time of closing of pipeline
itself.

This also leads to increase in memory footprint, as hlsdemux keeps selecting
different bitrates according to network conditions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list