[Bug 748412] New: tsdemux: possible refcount bug in applying PMT

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Apr 24 04:43:19 PDT 2015


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

            Bug ID: 748412
           Summary: tsdemux: possible refcount bug in applying PMT
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: vincent.penquerch at collabora.co.uk
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

In gst/mpegtsdemux/mpegtsbase.c, apply_pmt:

   /* If the current program is active, this means we have a new program */
   if (old_program->active) {
     old_program = mpegts_base_steal_program (base, program_number);
     program = mpegts_base_new_program (base, program_number, section->pid);
     g_hash_table_insert (base->programs,
         GINT_TO_POINTER (program_number), program);


This will create a new program with patcount 0. When a new PAT is encountered,
if it still references this program number, the patcount will be both
incremented and decremented, which will end up deleting that program.

File with this PMT change: http://people.collabora.com/~tester/pmt-change-2.ts

Setting the patcount to 1 when creating this new program makes it survive, but
seems wrong, as the program number is not found in the existing PAT by:

program = mpegts_base_get_program (base, program_number);

This seems to be because the program number was just "stolen" from the hash
table just before, for reasons I have no idea about.

Maybe the patcount should be copied from old_program to the new program instead
? I've no idea what the intent of this swapping code is so I'm not sure.

-- 
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