[gst-devel] Possible bug in subparse
KwangYul Seo
kwangyul.seo at gmail.com
Mon Nov 12 07:07:38 CET 2007
Hello,
I compiled subparse and pango in Windows and found a race condition in
subparse. In Windows, subparse module crashed immediately, but when I put a
g_usleep before get_pad_push(self->srcpad, buf) in handler_buffer() function
of gstsubparse.c, it works fine.
In gstsubparse.c:
static GstFlowReturn
handle_buffer (GstSubParse * self, GstBuffer * buf)
{
...
g_usleep(1000 * 1000); /* I put sleep here */
ret = gst_pad_push (self->srcpad, buf);
....
}
I don't need to call g_usleep everytime, but only for the first time after
the player is launched. The following code still works.
static GstFlowReturn
handle_buffer (GstSubParse * self, GstBuffer * buf)
{
static int init = 0;
...
if (init ==0) { /* Put sleep only for the first time */
g_usleep(1000 * 1000);
init = 1;
}
ret = gst_pad_push (self->srcpad, buf);
....
}
I guess there might be a subtle race condition bug in subparse or pango
module. However, I failed to find the scenario how this happened. Is this a
known issue?
The following is the stack trace from MSVC.
> libgstplaybin.dll!00e53e37()
libgstplaybin.dll!00e53d70()
libgobject-2.0-0.dll!62743995()
msvcrt.dll!77bdc774()
libglib-2.0-0.dll!672d2449()
libgobject-2.0-0.dll!62757195()
libglib-2.0-0.dll!672e52c5()
libgobject-2.0-0.dll!62747534()
libgobject-2.0-0.dll!6276388a()
libgobject-2.0-0.dll!62757f3e()
ntdll.dll!7c940732()
ntdll.dll!7c9406ab()
libgthread-2.0-0.dll!64941273()
libglib-2.0-0.dll!672fe47e()
libgobject-2.0-0.dll!6275bfe3()
ntdll.dll!7c9406eb()
libgthread-2.0-0.dll!64941b67()
msvcrt.dll!77bdc3ce()
libgthread-2.0-0.dll!64941b67()
libglib-2.0-0.dll!672f7045()
libgthread-2.0-0.dll!649412b3()
libgstreamer-0.10.dll!003b0f10()
libgstreamer-0.10.dll!003b0f2b()
libgobject-2.0-0.dll!6274773b()
libgstreamer-0.10.dll!00399306()
libgobject-2.0-0.dll!6275cc54()
ntdll.dll!7c9406eb()
msvcrt.dll!77bdc3c9()
msvcrt.dll!77bdc3ce()
msvcrt.dll!77bdc3ce()
libgobject-2.0-0.dll!6274773b()
libgstcoreelements.dll!00e7a980()
libgobject-2.0-0.dll!627581b6()
libgstcoreelements.dll!00e7a9c3()
libgstreamer-0.10.dll!003b25ba()
libgstplaybin.dll!00e58d6c()
libgstreamer-0.10.dll!003b25ba()
libgstreamer-0.10.dll!003a7225()
libgstreamer-0.10.dll!003b25ba()
libgstsubparse.dll!00df2b7c()
libgstsubparse.dll!00df26db()
libgstreamer-0.10.dll!003b25ba()
libgstcoreelements.dll!00e7e58a()
libgstreamer-0.10.dll!003b25ba()
libgstreamer-0.10.dll!003a7225()
libgstreamer-0.10.dll!003b25ba()
libgstbase-0.10.dll!00eaa006()
libgstreamer-0.10.dll!003c0959()
ntdll.dll!7c940551()
libglib-2.0-0.dll!672ff21a()
ntdll.dll!7c940551()
libgthread-2.0-0.dll!64941b42()
ntdll.dll!7c940551()
libglib-2.0-0.dll!672fd775()
ntdll.dll!7c940551()
libgthread-2.0-0.dll!649420da()
msvcrt.dll!77bea3b0()
ntdll.dll!7c940551()
kernel32.dll!7c80b683()
ntdll.dll!7c940551()
Thanks,
Kwang Yul Seo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20071112/5b38251a/attachment.htm>
More information about the gstreamer-devel
mailing list