Bug 171721 - [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
Summary: [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handle...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-05 03:54 PDT by Carlos Garcia Campos
Modified: 2017-05-05 05:59 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.99 KB, patch)
2017-05-05 03:56 PDT, Carlos Garcia Campos
calvaris: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-05-05 03:54:49 PDT
We are checking the errors only by their code, which can be the same in other domains. We should always check both the domain and the code.
Comment 1 Carlos Garcia Campos 2017-05-05 03:56:43 PDT
Created attachment 309157 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2017-05-05 04:54:34 PDT
Comment on attachment 309157 [details]
Patch

I am curious, what does this fix?
Comment 3 Carlos Garcia Campos 2017-05-05 04:59:16 PDT
I noticed this while working on bug #171722, so I don't know what it fixed, but for example, if we receive a GST_RESOURCE_ERROR_OPEN_WRITE error, it will be handled as a format error because the code is the same as GST_STREAM_ERROR_CODEC_NOT_FOUND.
Comment 4 Carlos Garcia Campos 2017-05-05 05:02:44 PDT
Committed r216239: <http://trac.webkit.org/changeset/216239>
Comment 5 Michael Catanzaro 2017-05-05 05:45:58 PDT
It would be good to grep for other uses of GStreamer error codes to ensure we didn't make this same mistake in other places.
Comment 6 Carlos Garcia Campos 2017-05-05 05:59:48 PDT
(In reply to Michael Catanzaro from comment #5)
> It would be good to grep for other uses of GStreamer error codes to ensure
> we didn't make this same mistake in other places.

I did it when I noticed the problem.