GNOME Bugzilla – Bug 367677
[fdsrc] skips the first byte
Last modified: 2006-10-30 19:23:08 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)
Does this happen every time?
Created attachment 75666 [details]
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".
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)...
lseek (src->fd, SEEK_CUR, 0) eats the byte, for some reason. lseek (src->fd, SEEK_SET, 0) works fine.
Should be fixed now.
2006-10-30 Michael Smith <firstname.lastname@example.org>
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
Get the arguments to lseek() the right way around.