From: <sl...@ke...> - 2007-01-25 18:28:28
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: slomo Date: Thu Jan 25 2007 17:54:20 UTC Log message: 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 Modified files: . : ChangeLog plugins/elements: gstfilesrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.3028&r2=1.3029 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/plugins/elements/gstfilesrc.c.diff?r1=1.145&r2=1.146 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.3028 retrieving revision 1.3029 diff -u -d -r1.3028 -r1.3029 --- ChangeLog 25 Jan 2007 17:41:39 -0000 1.3028 +++ ChangeLog 25 Jan 2007 17:54:07 -0000 1.3029 @@ -1,3 +1,13 @@ +2007-01-25 Sebastian Dröge <sl...@ci...> + + 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 <wi...@fl...> * gst/gstcaps.c: (_gst_caps_free), (gst_static_caps_get): Index: gstfilesrc.c RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesrc.c,v retrieving revision 1.145 retrieving revision 1.146 diff -u -d -r1.145 -r1.146 --- gstfilesrc.c 6 Nov 2006 17:53:24 -0000 1.145 +++ gstfilesrc.c 25 Jan 2007 17:54:07 -0000 1.146 @@ -943,7 +943,7 @@ { /* 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 @@ } else { src->seekable = TRUE; } + lseek (src->fd, 0, SEEK_SET); } /* We can only really do seeking on regular files - for other file types, we |