Bug 117736 - [GStreamer] Potential race condition when getting the video sink caps.
Summary: [GStreamer] Potential race condition when getting the video sink caps.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 117551
  Show dependency treegraph
 
Reported: 2013-06-18 06:30 PDT by Víctor M. Jáquez L.
Modified: 2013-06-19 02:14 PDT (History)
8 users (show)

See Also:


Attachments
Patch (9.05 KB, patch)
2013-06-18 07:52 PDT, Víctor M. Jáquez L.
no flags Details | Formatted Diff | Diff
Patch (8.98 KB, patch)
2013-06-18 10:10 PDT, Víctor M. Jáquez L.
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Víctor M. Jáquez L. 2013-06-18 06:30:36 PDT
There is a potential race condition with the pad setting caps, as the buffer and the caps won't match when renegotiation happens, and might cause a crash.
Comment 1 Víctor M. Jáquez L. 2013-06-18 07:52:38 PDT
Created attachment 204913 [details]
Patch
Comment 2 WebKit Commit Bot 2013-06-18 07:54:19 PDT
Attachment 204913 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp', u'Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h', u'Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp', u'Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.h']" exit_code: 1
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philippe Normand 2013-06-18 08:17:31 PDT
Comment on attachment 204913 [details]
Patch

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

Ok, just a couple of nitpicks:

> Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:302
> +static void webkitVideoSinkGetProperty(GObject *object, guint propId, GValue *value, GParamSpec *pspec)

The stars are misplaced, we also prefer to use longer names, like propertyId and parameterSpec

> Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:492
> +    GstCaps* currentCaps;

Please move this just before the g_object_get() call
Comment 4 Víctor M. Jáquez L. 2013-06-18 10:10:15 PDT
Created attachment 204921 [details]
Patch
Comment 5 WebKit Commit Bot 2013-06-18 10:13:17 PDT
Attachment 204921 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp', u'Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h', u'Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp']" exit_code: 1
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2013-06-19 02:14:21 PDT
Comment on attachment 204921 [details]
Patch

Clearing flags on attachment: 204921

Committed r151728: <http://trac.webkit.org/changeset/151728>
Comment 7 WebKit Commit Bot 2013-06-19 02:14:24 PDT
All reviewed patches have been landed.  Closing bug.