Bug 190125 - [MSE][GStreamer] Set a minimum sample duration
Summary: [MSE][GStreamer] Set a minimum sample duration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-01 04:33 PDT by Alicia Boya García
Modified: 2018-10-01 11:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.00 KB, patch)
2018-10-01 09:21 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (3.29 KB, patch)
2018-10-01 10:59 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2018-10-01 04:33:08 PDT
The last sample of the audio track in the asset used in this test player has a tiny duration (100 ns):

http://orange-opensource.github.io/hasplayer.js/1.2.0/player.html?url=http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest

So small, we are truncating it to zero. We're not supposed to have frames with zero duration an. Instead, lets set a minimum frame duration for those fringe cases.
Comment 1 Alicia Boya García 2018-10-01 09:21:46 PDT
Created attachment 351251 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2018-10-01 10:38:10 PDT
Comment on attachment 351251 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=351251&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp:59
> +        m_duration = createMediaTime(std::max(GST_BUFFER_DURATION(buffer), minimumDuration));

I'd recommend moving this above to a more prominent position than inside this method.
Comment 3 Alicia Boya García 2018-10-01 10:59:43 PDT
Created attachment 351270 [details]
Patch
Comment 4 WebKit Commit Bot 2018-10-01 11:38:58 PDT
Comment on attachment 351270 [details]
Patch

Clearing flags on attachment: 351270

Committed r236679: <https://trac.webkit.org/changeset/236679>
Comment 5 WebKit Commit Bot 2018-10-01 11:39:00 PDT
All reviewed patches have been landed.  Closing bug.