GNOME Bugzilla – Bug 332277
[filesrc] seek does not correct read position in non-mmap mode
Last modified: 2006-02-23 10:24:50 UTC
In the filesrc element, if the mmap code path is not used, i.e gst_file_src_create_read routine is called, setting of a offset different than the current read_position will cause a seek. But the read_position is not updated after the seek. This will cause some demuxers to fail on an architecture which does not support mmap. Currently: if (src->read_position != offset) { off_t res; res = lseek (src->fd, offset, SEEK_SET); if (res < 0 || res != offset) goto seek_failed; } Should be: if (src->read_position != offset) { off_t res; res = lseek (src->fd, offset, SEEK_SET); if (res < 0 || res != offset) goto seek_failed; src->read_position = offset; }
*** Bug 332278 has been marked as a duplicate of this bug. ***
Thanks, fixed in CVS: 2006-02-23 Tim-Philipp Müller <tim at centricular dot net> * plugins/elements/gstfilesrc.c: (gst_file_src_create_read): Update src->read_position after a seek when not using mmap. Fixes #332277, patch by: Renchi Raju <renchi gmail com>