From d2d5d96c41f21f2eb60b6ca61619b23ad6187780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Mon, 24 Nov 2003 22:52:15 +0000 Subject: Support for large files created by RIP input plugin. It's used fseeko(). When configure won't find it, it will be used fseek() with 2 GB limit. CVS patchset: 5778 CVS date: 2003/11/24 22:52:15 --- src/xine-engine/input_rip.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index 002e040d3..cefe5e4cb 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,13 +29,12 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.16 2003/11/23 23:43:35 valtri Exp $ + * $Id: input_rip.c,v 1.17 2003/11/24 22:52:15 valtri Exp $ */ /* TODO: * - resume feature (via #append) * - gui activation (after restarting playback) - * - long files support */ #ifdef HAVE_CONFIG_H @@ -58,6 +57,10 @@ #include "xine_internal.h" +#ifndef HAVE_FSEEKO +# define fseeko fseek +#endif + #define SCRATCH_SIZE 1024 #define MAX_TARGET_LEN 256 #define SEEK_TIMEOUT 2.5 @@ -354,7 +357,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) if (this->regular) { if (reqpos != this->savepos) { lprintf(" => seeking file to %lld\n", reqpos); - if (fseek(this->file, reqpos, SEEK_SET) != 0) { + if (fseeko(this->file, reqpos, SEEK_SET) != 0) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: seeking failed: %s\n"), strerror(errno)); return -1; @@ -373,7 +376,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) lprintf(" => seeking to end: %lld\n", this->savepos); if (this->regular) { lprintf(" => seeking file to end: %lld\n", this->savepos); - if (fseek(this->file, this->savepos, SEEK_SET) != 0) { + if (fseeko(this->file, this->savepos, SEEK_SET) != 0) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: seeking failed: %s\n"), strerror(errno)); return -1; -- cgit v1.2.3