gst-plugins-base-0.10.32: bug in gst-plugins-base-0.10.32/ext/pango/gsttextoverlay.c?

bcxa sz bcxa.sz at gmail.com
Fri Aug 19 03:15:23 PDT 2011


Hi Developers,

I found one potential bug in gst_text_overlay_text_chain() in
ext/pango/gsttextoverlay.c (as the mail title).

If looked at this piece of code,
  ...
  if (G_LIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))) {

    ...
    in_seg = gst_segment_clip (&overlay->text_segment, GST_FORMAT_TIME,
        GST_BUFFER_TIMESTAMP (buffer), stop, &clip_start, &clip_stop);
  } else {
    in_seg = TRUE;
  }

if (in_seg) {
  ...
  }
  GST_OBJECT_UNLOCK (overlay); // NOTE the buffer will not be unref in
case of in_seg == FALSE

beach:

  return ret;
}

If the in_seg == TRUE, the text buffer will render the text and push
into the queue.

But if in_seg = FALSE, the text buffer will not be unrefed. So I think
this is the bug and should add code to handle unref the buffer in case
of in_seg == FALSE.

Let me know if I am wrong.

best regards

BCXA


More information about the gstreamer-devel mailing list