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 367677 - [fdsrc] skips the first byte
[fdsrc] skips the first byte
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.11
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-30 15:05 UTC by Damien Genet
Modified: 2006-10-30 19:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Test case (1.07 KB, text/x-python)
2006-10-30 15:06 UTC, Damien Genet
Details

Description Damien Genet 2006-10-30 15:05:15 UTC
Please describe the problem:
It seems that he first byte of input is always lost when reading through fdsrc element.




Steps to reproduce:
See attached script for a test case and then diff the source and dest file or compare them via hexdump -c -n 10 for instance.

(If you use a filesrc the problem disapear)


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Damien Genet 2006-10-30 15:06:32 UTC
Created attachment 75666 [details]
Test case
Comment 2 Tim-Philipp Müller 2006-10-30 17:12:12 UTC
Seems to be a plugin bug in the core:

 $ echo "hello" > foo
 $ gst-launch-0.10 fdsrc fd=0 ! fakesink dump=true < foo

 Setting pipeline to PLAYING ...
 00000000 (0x8117800): 65 6c 6c 6f 0a                                   ello.           
 Got EOS from element "pipeline0".
Comment 3 Wim Taymans 2006-10-30 18:03:57 UTC
but this works fine (except for the \n at the end):

 cat hello.txt | gst-launch-0.10 fdsrc fd=0 ! fakesink dump=true

I don't see anything wrong in the code (yet)...
Comment 4 Wim Taymans 2006-10-30 18:18:19 UTC
lseek (src->fd, SEEK_CUR, 0) eats the byte, for some reason. lseek (src->fd, SEEK_SET, 0) works fine.
Comment 5 Michael Smith 2006-10-30 18:43:52 UTC
Should be fixed now.

2006-10-30  Michael Smith  <msmith@fluendo.com>

        * plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
          Get the arguments to lseek() the right way around.
          Fixes 367677.