RESOLVED FIXED 215263
[MSE][GStreamer] Remove m_sourceBufferPrivateClient checks in SourceBufferPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=215263
Summary [MSE][GStreamer] Remove m_sourceBufferPrivateClient checks in SourceBufferPri...
Alicia Boya García
Reported 2020-08-07 05:10:24 PDT
m_sourceBufferPrivateClient is only reset to NULL from SourceBuffer's destructor. At this point SourceBufferPrivateGStreamer is about to receive its last unref by SourceBuffer and therefore be destroyed. Similarly, there is no need to check for m_mediaSource being null. m_mediaSource is only reset when the SourceBuffer is removed, and at that point SourceBufferPrivate shouldn't receive any calls. This is a clean-up and doesn't introduce new behavior. Asserts have been added checking the precondition above.
Attachments
Patch (4.89 KB, patch)
2020-08-07 05:28 PDT, Alicia Boya García
no flags
Patch (5.14 KB, patch)
2020-08-07 05:54 PDT, Alicia Boya García
no flags
Alicia Boya García
Comment 1 2020-08-07 05:28:01 PDT
Alicia Boya García
Comment 2 2020-08-07 05:54:22 PDT
Xabier Rodríguez Calvar
Comment 3 2020-08-11 01:44:19 PDT
Comment on attachment 406166 [details] Patch I would be quieter if we ASSERT on the client before calling it.
Alicia Boya García
Comment 4 2020-08-11 01:52:37 PDT
(In reply to Xabier Rodríguez Calvar from comment #3) > Comment on attachment 406166 [details] > Patch > > I would be quieter if we ASSERT on the client before calling it. The way I see it, there is already an implicit assert there, built in the CPU: the pointer indirection will segfault (and crash, just like with asserts) in that same line if m_sourceBufferPrivateClient is NULL. Since it's the only pointer being indirected in that line, or the function even, an assert doesn't give us any more specificity even when looking at the traceback.
EWS
Comment 5 2020-08-11 04:41:16 PDT
Committed r265494: <https://trac.webkit.org/changeset/265494> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406166 [details].
Note You need to log in before you can comment on or make changes to this bug.