Bug 230829

Summary: [MSE][GStreamer] Don't create MediaSourceTrackGStreamer objects twice for the same track
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: WebKitGTKAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, cgarcia, ews-watchlist, gns, menard, pnormand, vjaquez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alicia Boya García 2021-09-27 07:07:05 PDT
The existing code in
SourceBufferPrivateGStreamer::didReceiveInitializationSegment()
was not checking if the track already existing, creating and
immediately destroying a MediaSourceTrackGStreamer, which then crashed
on an assertion (ASSERTION FAILED: m_isRemoved).

This fixes the following two tests which were crashing with the former
assertion when running in Debug:

- media/media-source/media-mp4-h264-partial-abort.html
- media/media-source/media-source-abort-resets-parser.html
Comment 1 Alicia Boya García 2021-09-27 07:07:54 PDT
Created attachment 439350 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2021-09-28 03:20:15 PDT
Comment on attachment 439350 [details]
Patch

Doesn't this need changing the expectations?
Comment 3 Alicia Boya García 2021-09-28 08:57:00 PDT
(In reply to Xabier Rodríguez Calvar from comment #2)
> Comment on attachment 439350 [details]
> Patch
> 
> Doesn't this need changing the expectations?

No, because the expectations were not updated in the first place, they were appearing as unexpected crashes.
Comment 4 EWS 2021-09-28 09:32:37 PDT
Committed r283176 (242224@main): <https://commits.webkit.org/242224@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439350 [details].