Summary: | [GStreamer] Should handle unknown duration better | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sebastian Dröge (slomo) <slomo> | ||||||
Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | jmalonzo, pnormand | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Sebastian Dröge (slomo)
2009-10-02 01:28:41 PDT
Sames goes for the query_duration() calls in BYTE format btw. Created attachment 40703 [details]
patch for duration query
Here's a patch for the time duration query. I'm not flagging it for review yet even though I'm pretty sure it's correct, but I'd like Sebastian to look it over just to be sure.
Almost correct, yes. Just remove the complete GStreamer version check and only check for time!=GST_CLOCK_TIME_NONE. "negative" times are always ok because the time really is a unsigned integer. Created attachment 40785 [details]
patch for duration query, try 2
Looks good to me Comment on attachment 40785 [details] patch for duration query, try 2 > + if (!gst_element_query_duration(m_playBin, &timeFormat, &timeLength) || > + timeFormat != GST_FORMAT_TIME || > + timeLength == GST_CLOCK_TIME_NONE) { We don't normally break the expression into multiple lines. I'll fix it up when landing. Is it possible to test this or is this covered by our existing tests already? r=me. (In reply to comment #6) > (From update of attachment 40785 [details]) > > > + if (!gst_element_query_duration(m_playBin, &timeFormat, &timeLength) || > > + timeFormat != GST_FORMAT_TIME || > > + timeLength == GST_CLOCK_TIME_NONE) { > > We don't normally break the expression into multiple lines. I'll fix it up when > landing. > > Is it possible to test this or is this covered by our existing tests already? > > r=me. Landed as http://trac.webkit.org/changeset/49774 |