After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637822 - oggdemux: allocate buffers using gst_buffer_new_and_alloc
oggdemux: allocate buffers using gst_buffer_new_and_alloc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-22 19:11 UTC by Vincent Penquerc'h
Modified: 2010-12-24 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
oggdemux: allocate buffers using gst_buffer_new_and_alloc instead of gst_pad_alloc_buffer_and_set_caps, as the first one will cause the pad to block, and we don't want that since that will prevent subsequent pads from being fed if a block occurs at sta (1.33 KB, patch)
2010-12-22 19:11 UTC, Vincent Penquerc'h
committed Details | Review
mve: do not use the pad buffer allocation functions in demuxers (1.22 KB, patch)
2010-12-24 10:26 UTC, Vincent Penquerc'h
rejected Details | Review
mpegdemux: do not use the pad buffer allocation functions in demuxers (1022 bytes, patch)
2010-12-24 10:26 UTC, Vincent Penquerc'h
rejected Details | Review
realmedia: do not use the pad buffer allocation functions in demuxers (3.49 KB, patch)
2010-12-24 10:26 UTC, Vincent Penquerc'h
rejected Details | Review

Description Vincent Penquerc'h 2010-12-22 19:11:36 UTC
Allocate buffers using gst_buffer_new_and_alloc instead of
gst_pad_alloc_buffer_and_set_caps, as the first one will cause the pad to block,
and we don't want that since that will prevent subsequent pads from being fed
if a block occurs at start, when all pads must be fed for playback to start.
Comment 1 Vincent Penquerc'h 2010-12-22 19:11:40 UTC
Created attachment 176892 [details] [review]
oggdemux: allocate buffers using gst_buffer_new_and_alloc  instead of gst_pad_alloc_buffer_and_set_caps, as the first one will  cause the pad to block, and we don't want that since that will  prevent subsequent pads from being fed if a block occurs at sta
Comment 2 Sebastian Dröge (slomo) 2010-12-22 19:20:37 UTC
commit e443ae6000ddfd4d469c6614914fd700396558b1
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Wed Dec 22 19:06:56 2010 +0000

    oggdemux: Don't use gst_pad_alloc_buffer()
    
    allocate buffers using gst_buffer_new_and_alloc() instead of
    gst_pad_alloc_buffer_and_set_caps(), as the first one will
    cause the pad to block, and we don't want that since that will
    prevent subsequent pads from being fed if a block occurs at
    start, when all pads must be fed for playback to start.
    
    This fixes autoplugging of the tiger element and other things.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=637822
Comment 3 Sebastian Dröge (slomo) 2010-12-22 19:20:59 UTC
Comment on attachment 176892 [details] [review]
oggdemux: allocate buffers using gst_buffer_new_and_alloc  instead of gst_pad_alloc_buffer_and_set_caps, as the first one will  cause the pad to block, and we don't want that since that will  prevent subsequent pads from being fed if a block occurs at sta

gst_buffer_new_and_alloc() will always succeed (or call abort()).

Pushed with that change
Comment 4 Vincent Penquerc'h 2010-12-24 10:26:27 UTC
Created attachment 176992 [details] [review]
mve: do not use the pad buffer allocation functions in demuxers

Doing so can block, see
Comment 5 Vincent Penquerc'h 2010-12-24 10:26:39 UTC
Created attachment 176993 [details] [review]
mpegdemux: do not use the pad buffer allocation functions in demuxers

Doing so can block, see
Comment 6 Vincent Penquerc'h 2010-12-24 10:26:59 UTC
Created attachment 176994 [details] [review]
realmedia: do not use the pad buffer allocation functions in demuxers

Doing so can block, see
Comment 7 Vincent Penquerc'h 2010-12-24 10:28:40 UTC
Same for other demuxers while we're at it.
Comment 8 Vincent Penquerc'h 2010-12-24 10:49:48 UTC
Actually, tpm pointed out gst_buffer_new_and_alloc cannot fail, so I'll remove the error checking and add those patches in separate bugs. Sorry for the hassle.