Summary: | [GStreamer] Fix video losing size at the end of the stream | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alicia Boya García <aboya> | ||||||
Component: | WebKitGTK | Assignee: | Alicia Boya García <aboya> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bugs-noreply, calvaris, cgarcia, clopez, eric.carlson, ews-watchlist, glenn, gustavo, jer.noble, menard, philipj, pnormand, sergio, vjaquez, youennf | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://github.com/web-platform-tests/wpt/pull/26743 | ||||||||
Attachments: |
|
Description
Alicia Boya García
2020-12-03 09:24:42 PST
(In reply to Alicia Boya García from comment #0) > sue where at the end of the video the > tracks would be erased, causing the video to lose its size and by > extension its aspect ratio. The first paragraph got cut: Our port for long had an issue where at the end of the video the tracks would be erased, causing the video to lose its size and by extension its aspect ratio. Created attachment 415305 [details]
Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/26743 Comment on attachment 415305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415305&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1066 > + existingTrack->setPad(GRefPtr(pad)); Nit: Unless that for some reason you want to keep it explicit, you can remove the GRefPtr constructor that will be called implicitly. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1147 > + existingTrack->setPad(GRefPtr(pad)); Ditto. > Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:179 > +void TrackPrivateBaseGStreamer::setPad(GRefPtr<GstPad>&& pad) > +{ > + m_pad = WTFMove(pad); > +} Nit: I think you can inline this in the header file. Comment on attachment 415305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415305&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1066 >> + existingTrack->setPad(GRefPtr(pad)); > > Nit: Unless that for some reason you want to keep it explicit, you can remove the GRefPtr constructor that will be called implicitly. Unfortunately that's not the case. setPad() expects an rvalue reference, but since here we don't want to do a move, we have to create a new one by coping the reference. Otherwise you get this error: error: cannot bind rvalue reference of type ‘WTF::GRefPtr<_GstPad>&&’ to lvalue of type ‘WTF::GRefPtr<_GstPad>’ Comment on attachment 415305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415305&action=review >>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1066 >>> + existingTrack->setPad(GRefPtr(pad)); >> >> Nit: Unless that for some reason you want to keep it explicit, you can remove the GRefPtr constructor that will be called implicitly. > > Unfortunately that's not the case. setPad() expects an rvalue reference, but since here we don't want to do a move, we have to create a new one by coping the reference. Otherwise you get this error: > > error: cannot bind rvalue reference of type ‘WTF::GRefPtr<_GstPad>&&’ to lvalue of type ‘WTF::GRefPtr<_GstPad>’ Ah, sorry, I thought pad was a GstPad* instead of a GRefPtr<GstPad>. Forget this. Created attachment 415325 [details]
Patch for landing
Committed r270404: <https://trac.webkit.org/changeset/270404> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415325 [details]. |