GNOME Bugzilla – Bug 499771
using a fifo as filesink doesn't seem to work
Last modified: 2007-11-27 18:45:38 UTC
Using: gst-launch filesrc location="./testfile" ! filesink location="./testfifo" with ./testfifo being a fifo is failing due to a tentative of seeking on./testfifo. Since #343312 was closed, filesink is reporting tentative of seeking on non seekable outputs. In the current case, it properly reports the error. However, it seems that this still doesn't work. From reading gst_file_sink_event within gstfilesink.c, I noticed that in case of GST_EVENT_NEWSEGMENT, the filesink element would issue a seek. In my case, the problematic seek request tries to seek at offset 0 (from debug output of gst-inspect). I think that it might be because a GST_EVENT_NEWSEGMENT is initially issued, and filesink then tries to seek, even if it's requested to seek at the current (initial) position.
Created attachment 99710 [details] [review] first attempt The patch checks if the requested seek offset is different from the current offset and only tries to seek if different. This should not fail for the initial segment even if the sink is not seekable.
* plugins/elements/gstfilesink.c: (gst_file_sink_event): Be a bit smarter when seeking, like, don't try to do a seek when it's not needed. This avoids errors when the file is not seekable. Fixes #499771.