After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796843 - srtserversink: Do not post error message during stopping
srtserversink: Do not post error message during stopping
Status: RESOLVED DUPLICATE of bug 796842
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-20 11:19 UTC by Seungha Yang
Modified: 2018-07-29 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
srtserversink: Do not post error message during stopping (2.26 KB, patch)
2018-07-20 11:19 UTC, Seungha Yang
none Details | Review

Description Seungha Yang 2018-07-20 11:19:03 UTC
During stopping sink, "Invalid epoll ID" error from libsrt is
not an unexpected behavior, since the epoll was released already
for interrupting srt_epoll_wait().
Comment 1 Seungha Yang 2018-07-20 11:19:49 UTC
Created attachment 373102 [details] [review]
srtserversink: Do not post error message during stopping
Comment 2 Olivier Crête 2018-07-20 14:52:49 UTC
Review of attachment 373102 [details] [review]:

::: ext/srt/gstsrtserversink.c
@@ +206,2 @@
     int srt_errno = srt_getlasterror (NULL);
 

Maybe we just want to do:

if (g_atomic_int_get (&priv->cancelled))
  return FALSE;

before the check for the srt_errno value..
Comment 3 Seungha Yang 2018-07-20 15:35:55 UTC
(In reply to Olivier Crête from comment #2)
> Review of attachment 373102 [details] [review] [review]:
> 
> ::: ext/srt/gstsrtserversink.c
> @@ +206,2 @@
>      int srt_errno = srt_getlasterror (NULL);
>  
> 
> Maybe we just want to do:
> 
> if (g_atomic_int_get (&priv->cancelled))
>   return FALSE;
> 
> before the check for the srt_errno value..

Thanks. That looks better to me also :)
Comment 4 Seungha Yang 2018-07-20 15:45:09 UTC
Review of attachment 373102 [details] [review]:

::: ext/srt/gstsrtserversink.c
@@ +219,2 @@
       GST_DEBUG_OBJECT (self, "Cancelled waiting for client");
       ret = FALSE;

What was the exact expected behavior in here?

For some reasons, basesink::unlock() && basesink::unlock_stop() can be called and
then, this GSource callback function could be returned with "FALSE" 
(if my understanding is correct, then this callback will not be called again)

But there seems no code for re- attaching GSource. Do I missing something?
Comment 5 Olivier Crête 2018-07-20 17:13:45 UTC
(In reply to Seungha Yang from comment #4)
> Review of attachment 373102 [details] [review] [review]:
> 
> ::: ext/srt/gstsrtserversink.c
> @@ +219,2 @@
>        GST_DEBUG_OBJECT (self, "Cancelled waiting for client");
>        ret = FALSE;
> 
> What was the exact expected behavior in here?
> 
> For some reasons, basesink::unlock() && basesink::unlock_stop() can be
> called and
> then, this GSource callback function could be returned with "FALSE" 
> (if my understanding is correct, then this callback will not be called again)
> 
> But there seems no code for re- attaching GSource. Do I missing something?

I think the unlock/unlock_stop() shouldn't be used here.. instead it should just stop the thread in the _stop() vfunc like you added. unlock/unlock_stop() are normally for the case where it can block in the _render() vfunc. But here we jut create a new thread where blocking happens.
Comment 6 Seungha Yang 2018-07-29 12:40:05 UTC
I updated a patch for fixing this issue on bug #796842.
Please drop this ticket.
Comment 7 Tim-Philipp Müller 2018-07-29 16:14:09 UTC

*** This bug has been marked as a duplicate of bug 796842 ***