[gstreamer-bugs] [Bug 547277] New: filesrc detect if a file is seekable using SEEK_SET and not SEEK_END

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Aug 11 04:59:01 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=547277

  GStreamer | gstreamer (core) | Ver: HEAD CVS
           Summary: filesrc detect if a file is seekable using SEEK_SET and
                    not SEEK_END
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: alessandro at nnva.org
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Under windows playing a matroska file of 4695522630 bytes fails as filesrc
thinks that the file is not seekable.
Filesrc uses this code to determine if a file is seekable:

    off_t res = lseek (src->fd, 0, SEEK_END);

    if (res < 0) {
      GST_LOG_OBJECT (src, "disabling seeking, not in mmap mode and lseek "
          "failed: %s", g_strerror (errno));
      src->seekable = FALSE;
    } else {
      src->seekable = TRUE;
    }

In windows with such matroska file lseek fails with Invalid argument.
Changing the lseek call to lseek (src->fd, stat_results.st_size, SEEK_SET)
works.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=547277.




More information about the Gstreamer-bugs mailing list