mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
plugins/elements/gstfilesrc.c: If not using mmap'ed files try to seek to the end instead of the start to determine wh...
Original commit message from CVS: Patch by: Jindrich Makovicka <jindrich.makovick at itonis dot tv> * plugins/elements/gstfilesrc.c: (gst_file_src_start): If not using mmap'ed files try to seek to the end instead of the start to determine whether we can seek at all. This fixes the case of 2GB+ files over NFS, where seeks in the first 2GB can succeed but seeks for everything afterwards fail. Fixes #400656
This commit is contained in:
parent
76e88f9d37
commit
46848a3595
2 changed files with 12 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2007-01-25 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
Patch by: Jindrich Makovicka <jindrich.makovick at itonis dot tv>
|
||||
|
||||
* plugins/elements/gstfilesrc.c: (gst_file_src_start):
|
||||
If not using mmap'ed files try to seek to the end instead of the
|
||||
start to determine whether we can seek at all. This fixes the case
|
||||
of 2GB+ files over NFS, where seeks in the first 2GB can succeed but
|
||||
seeks for everything afterwards fail. Fixes #400656
|
||||
|
||||
2007-01-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstcaps.c: (_gst_caps_free), (gst_static_caps_get):
|
||||
|
|
|
@ -943,7 +943,7 @@ gst_file_src_start (GstBaseSrc * basesrc)
|
|||
{
|
||||
/* If not in mmap mode, we need to check if the underlying file is
|
||||
* seekable. */
|
||||
off_t res = lseek (src->fd, 0, SEEK_CUR);
|
||||
off_t res = lseek (src->fd, 0, SEEK_END);
|
||||
|
||||
if (res < 0) {
|
||||
GST_LOG_OBJECT (src, "disabling seeking, not in mmap mode and lseek "
|
||||
|
@ -952,6 +952,7 @@ gst_file_src_start (GstBaseSrc * basesrc)
|
|||
} else {
|
||||
src->seekable = TRUE;
|
||||
}
|
||||
lseek (src->fd, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
/* We can only really do seeking on regular files - for other file types, we
|
||||
|
|
Loading…
Reference in a new issue