[Bug 652788] New: fdsrc doessn't respect blocksize

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jun 16 16:22:05 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=652788
  GStreamer | gst-plugins-base | unspecified

           Summary: fdsrc doessn't respect blocksize
    Classification: Platform
           Product: GStreamer
           Version: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: mat at kivy.org
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Hi,

I wanted to use fdsrc to read raw RGBA images from stdin. But it seem that
blocksize is not respected by fdsrc since i got error like:

** (gst-launch-0.10:27332): WARNING **: ffmpegcsp0: size 1917952 is not a
multiple of unit size 1920000

When i look at gstfdsrc.c, it look like read() is not protected if the
blocksize is less than required. As the manpage said: "It is not an error if
this number is smaller than the number of bytes requested;" but it's possible !
You need to fill the buffer completly, not leaving with a half-buffer.

Here is a simple test that show the invalid read():

cat /dev/urandom | GST_DEBUG=fdsrc:5 gst-launch fdsrc blocksize=1920000 !
fakesink

Will output things like:
0:00:06.091897230 27426      0x2458ee0 LOG                    fdsrc
gstfdsrc.c:464:gst_fd_src_create:<fdsrc0> read 32768
0:00:06.091906240 27426      0x2458ee0 LOG                    fdsrc
gstfdsrc.c:478:gst_fd_src_create:<fdsrc0> Read buffer of size 32768

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list