[Bug 644154] [matroskamux] Force a new cluster after each GstForceKeyUnit event

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Mar 14 16:41:10 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=644154
  GStreamer | gst-plugins-good | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #182763|none                        |needs-work
             status|                            |

--- Comment #1 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2011-03-14 23:40:54 UTC ---
(From update of attachment 182763)
>Subject: [PATCH] matroskamux: force a new cluster after a GstForceKwyUnit event

Typo in commit message :)

>+    case GST_EVENT_CUSTOM_DOWNSTREAM:{
>+      const GstStructure *structure;
>+
>+      structure = gst_event_get_structure (event);
>+      if (!g_strcmp0 (gst_structure_get_name (structure), "GstForceKeyUnit"))
>+        gst_event_ref (event);
>+      mux->force_key_unit_event = event;
>+      break;
>+    }
>     default:
>       break;
>   }

The refcounting looks broken here, and why is event saved in
mux->force_key_unit_event in any case, even for other CUSTOM_DOWNSTREAM events?

Shouldn't it be more like:

if (gst_structure_has_name (event->structure, "GstForceKeyUnit")) {
  gst_event_replace (&mux->force_key_unit_event, NULL);
  mux->force_key_unit_event = event;
  event = NULL;
}

? (with up-to-date git)


>+      /* Forward the GstForceKeyUnit event after finishing the cluster */
>+      if (mux->force_key_unit_event) {
>+        gst_pad_push_event (collect_pad->collect.pad,
>+            mux->force_key_unit_event);
>+        mux->force_key_unit_event = NULL;
>+      }

Need to make sure mux->force_key_unit_event is also freed in case we shut down
early or don't get around to pushing it downstream for some other reason (e.g.
in stop/reset/downward state change function or so).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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