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 332277 - [filesrc] seek does not correct read position in non-mmap mode
[filesrc] seek does not correct read position in non-mmap mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.2
Other Linux
: Normal major
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 332278 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-23 05:52 UTC by Renchi Raju
Modified: 2006-02-23 10:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Renchi Raju 2006-02-23 05:52:38 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;
  }
Comment 1 Renchi Raju 2006-02-23 06:15:33 UTC
*** Bug 332278 has been marked as a duplicate of this bug. ***
Comment 2 Tim-Philipp Müller 2006-02-23 10:24:50 UTC
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>