[MPlayer-cvslog] r35975 - in trunk/stream: asf_mmst_streaming.c asf_streaming.c network.c network.h stream.c stream.h stream_bd.c stream_bluray.c stream_cdda.c stream_cue.c stream_dvd.c stream_dvdnav.c stream_ffmpe...

reimar subversion at mplayerhq.hu
Sat Mar 16 11:09:12 CET 2013


Author: reimar
Date: Sat Mar 16 11:09:12 2013
New Revision: 35975

Log:
Replace some uses of off_t by uint64_t.

This allows code that does not rely on lseek etc. to work
even on systems that do not support 64 bit off_t yet.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

Modified:
   trunk/stream/asf_mmst_streaming.c
   trunk/stream/asf_streaming.c
   trunk/stream/network.c
   trunk/stream/network.h
   trunk/stream/stream.c
   trunk/stream/stream.h
   trunk/stream/stream_bd.c
   trunk/stream/stream_bluray.c
   trunk/stream/stream_cdda.c
   trunk/stream/stream_cue.c
   trunk/stream/stream_dvd.c
   trunk/stream/stream_dvdnav.c
   trunk/stream/stream_ffmpeg.c
   trunk/stream/stream_file.c
   trunk/stream/stream_ftp.c
   trunk/stream/stream_live555.c
   trunk/stream/stream_nemesi.c
   trunk/stream/stream_netstream.c
   trunk/stream/stream_smb.c
   trunk/stream/stream_vcd.c
   trunk/stream/stream_vstream.c

Modified: trunk/stream/asf_mmst_streaming.c
==============================================================================
--- trunk/stream/asf_mmst_streaming.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/asf_mmst_streaming.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -505,7 +505,7 @@ static int asf_mmst_streaming_read( int 
 
 }
 
-static int asf_mmst_streaming_seek( int fd, off_t pos, streaming_ctrl_t *streaming_ctrl )
+static int asf_mmst_streaming_seek( int fd, uint64_t pos, streaming_ctrl_t *streaming_ctrl )
 {
 	return -1;
 	// Shut up gcc warning

Modified: trunk/stream/asf_streaming.c
==============================================================================
--- trunk/stream/asf_streaming.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/asf_streaming.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -453,7 +453,7 @@ static int asf_http_streaming_read( int 
   return read;
 }
 
-static int asf_http_streaming_seek( int fd, off_t pos, streaming_ctrl_t *streaming_ctrl ) {
+static int asf_http_streaming_seek( int fd, uint64_t pos, streaming_ctrl_t *streaming_ctrl ) {
 	return -1;
 	// to shut up gcc warning
 	fd++;

Modified: trunk/stream/network.c
==============================================================================
--- trunk/stream/network.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/network.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -197,7 +197,7 @@ URL_t *url_new_with_proxy(const char *ur
 }
 
 int
-http_send_request( URL_t *url, off_t pos ) {
+http_send_request( URL_t *url, uint64_t pos ) {
 	HTTP_header_t *http_hdr;
 	URL_t *server_url;
 	char str[256];
@@ -383,7 +383,7 @@ http_authenticate(HTTP_header_t *http_hd
 }
 
 int
-http_seek( stream_t *stream, off_t pos ) {
+http_seek( stream_t *stream, uint64_t pos ) {
 	HTTP_header_t *http_hdr = NULL;
 	int fd;
 	if( stream==NULL ) return 0;
@@ -479,7 +479,7 @@ nop_streaming_read( int fd, char *buffer
 }
 
 int
-nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ) {
+nop_streaming_seek( int fd, uint64_t pos, streaming_ctrl_t *stream_ctrl ) {
 	return -1;
 }
 

Modified: trunk/stream/network.h
==============================================================================
--- trunk/stream/network.h	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/network.h	Sat Mar 16 11:09:12 2013	(r35975)
@@ -76,10 +76,10 @@ streaming_ctrl_t *streaming_ctrl_new(voi
 int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size);
 
 int nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctrl );
-int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl );
+int nop_streaming_seek( int fd, uint64_t pos, streaming_ctrl_t *stream_ctrl );
 void streaming_ctrl_free( streaming_ctrl_t *streaming_ctrl );
 
-int http_send_request(URL_t *url, off_t pos);
+int http_send_request(URL_t *url, uint64_t pos);
 HTTP_header_t *http_read_response(int fd);
 
 int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry);
@@ -87,6 +87,6 @@ URL_t* check4proxies(const URL_t *url);
 URL_t *url_new_with_proxy(const char *urlstr);
 
 void fixup_network_stream_cache(stream_t *stream);
-int http_seek(stream_t *stream, off_t pos);
+int http_seek(stream_t *stream, uint64_t pos);
 
 #endif /* MPLAYER_NETWORK_H */

Modified: trunk/stream/stream.c
==============================================================================
--- trunk/stream/stream.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -286,7 +286,7 @@ static int stream_reconnect(stream_t *s)
 #define MAX_RECONNECT_RETRIES 5
 #define RECONNECT_SLEEP_MS 1000
     int retry = 0;
-    off_t pos = s->pos;
+    uint64_t pos = s->pos;
     // Seeking is used as a hack to make network streams
     // reopen the connection, ideally they would implement
     // e.g. a STREAM_CTRL_RECONNECT to do this
@@ -380,7 +380,7 @@ int stream_write_buffer(stream_t *s, uns
   return rd;
 }
 
-int stream_seek_internal(stream_t *s, off_t newpos)
+int stream_seek_internal(stream_t *s, uint64_t newpos)
 {
 if(newpos==0 || newpos!=s->pos){
   switch(s->type){
@@ -428,9 +428,9 @@ if(newpos==0 || newpos!=s->pos){
   return -1;
 }
 
-int stream_seek_long(stream_t *s,off_t pos){
+int stream_seek_long(stream_t *s, uint64_t pos){
   int res;
-off_t newpos=0;
+  uint64_t newpos=0;
 
 //  if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ) printf("seek_long to 0x%X\n",(unsigned int)pos);
 
@@ -445,7 +445,7 @@ off_t newpos=0;
   if(s->sector_size)
       newpos = (pos/s->sector_size)*s->sector_size;
   else
-      newpos = pos&(~((off_t)STREAM_BUFFER_SIZE-1));
+      newpos = pos&(~((uint64_t)STREAM_BUFFER_SIZE-1));
 
 if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ){
   mp_msg(MSGT_STREAM,MSGL_DBG3, "s->pos=%"PRIX64"  newpos=%"PRIX64"  new_bufpos=%"PRIX64"  buflen=%X  \n",

Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream.h	Sat Mar 16 11:09:12 2013	(r35975)
@@ -128,7 +128,7 @@ typedef struct streaming_control {
 	unsigned int buffer_pos;
 	unsigned int bandwidth;	// The downstream available
 	int (*streaming_read)( int fd, char *buffer, int buffer_size, struct streaming_control *stream_ctrl );
-	int (*streaming_seek)( int fd, off_t pos, struct streaming_control *stream_ctrl );
+	int (*streaming_seek)( int fd, uint64_t pos, struct streaming_control *stream_ctrl );
 	void *data;
 } streaming_ctrl_t;
 
@@ -155,7 +155,7 @@ typedef struct stream {
   // Write
   int (*write_buffer)(struct stream *s, char* buffer, int len);
   // Seek
-  int (*seek)(struct stream *s,off_t pos);
+  int (*seek)(struct stream *s, uint64_t pos);
   // Control
   // Will be later used to let streams like dvd and cdda report
   // their structure (ie tracks, chapters, etc)
@@ -169,7 +169,7 @@ typedef struct stream {
   int sector_size; // sector size (seek will be aligned on this size if non 0)
   int read_chunk; // maximum amount of data to read at once to limit latency (0 for default)
   unsigned int buf_pos,buf_len;
-  off_t pos,start_pos,end_pos;
+  uint64_t pos,start_pos,end_pos;
   int eof;
   int mode; //STREAM_READ or STREAM_WRITE
   unsigned int cache_pid;
@@ -188,7 +188,7 @@ typedef struct stream {
 #endif
 
 int stream_fill_buffer(stream_t *s);
-int stream_seek_long(stream_t *s, off_t pos);
+int stream_seek_long(stream_t *s, uint64_t pos);
 void stream_capture_do(stream_t *s);
 
 #ifdef CONFIG_STREAM_CACHE
@@ -312,12 +312,12 @@ static inline int stream_eof(stream_t *s
   return s->eof;
 }
 
-static inline off_t stream_tell(stream_t *s)
+static inline uint64_t stream_tell(stream_t *s)
 {
   return s->pos+s->buf_pos-s->buf_len;
 }
 
-static inline int stream_seek(stream_t *s, off_t pos)
+static inline int stream_seek(stream_t *s, uint64_t pos)
 {
 
   mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIX64"\n", pos);
@@ -328,7 +328,7 @@ static inline int stream_seek(stream_t *
     pos = 0;
   }
   if(pos<s->pos){
-    off_t x=pos-(s->pos-s->buf_len);
+    uint64_t x=pos-(s->pos-s->buf_len);
     if(x>=0){
       s->buf_pos=x;
 //      putchar('*');fflush(stdout);
@@ -339,7 +339,7 @@ static inline int stream_seek(stream_t *
   return cache_stream_seek_long(s,pos);
 }
 
-static inline int stream_skip(stream_t *s, off_t len)
+static inline int stream_skip(stream_t *s, uint64_t len)
 {
   if( len<0 || (len>2*STREAM_BUFFER_SIZE && (s->flags & MP_STREAM_SEEK_FW)) ) {
     // negative or big skip!
@@ -375,7 +375,7 @@ int stream_check_interrupt(int time);
 /// Internal read function bypassing the stream buffer
 int stream_read_internal(stream_t *s, void *buf, int len);
 /// Internal seek function bypassing the stream buffer
-int stream_seek_internal(stream_t *s, off_t newpos);
+int stream_seek_internal(stream_t *s, uint64_t newpos);
 
 extern int bluray_angle;
 extern int bluray_chapter;

Modified: trunk/stream/stream_bd.c
==============================================================================
--- trunk/stream/stream_bd.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_bd.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -101,7 +101,7 @@ struct bd_priv {
     stream_t     *title_file;
     struct AVAES *aescbc;
     struct AVAES *aeseed;
-    off_t         pos;
+    uint64_t      pos;
     struct uks    uks;
     int           nr_lang_maps;
     struct lang_map *lang_maps;
@@ -117,7 +117,7 @@ static void bd_stream_close(stream_t *s)
     free(bd);
 }
 
-static int bd_stream_seek(stream_t *s, off_t pos)
+static int bd_stream_seek(stream_t *s, uint64_t pos)
 {
     struct bd_priv *bd = s->priv;
 
@@ -275,7 +275,7 @@ static int bd_get_uks(struct bd_priv *bd
 }
 
 // NOTE: we assume buf is sufficiently aligned to 64 bit read/writes
-static off_t bd_read(struct bd_priv *bd, uint8_t *buf, int len)
+static uint64_t bd_read(struct bd_priv *bd, uint8_t *buf, int len)
 {
     int read_len;
     int unit_offset = bd->pos % BD_UNIT_SIZE;

Modified: trunk/stream/stream_bluray.c
==============================================================================
--- trunk/stream/stream_bluray.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_bluray.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -87,10 +87,10 @@ static void bluray_stream_close(stream_t
     free(b);
 }
 
-static int bluray_stream_seek(stream_t *s, off_t pos)
+static int bluray_stream_seek(stream_t *s, uint64_t pos)
 {
     struct bluray_priv_s *b = s->priv;
-    off_t p;
+    uint64_t p;
 
     p = bd_seek(b->bd, pos);
     if (p == -1)

Modified: trunk/stream/stream_cdda.c
==============================================================================
--- trunk/stream/stream_cdda.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_cdda.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -170,7 +170,7 @@ static int fill_buffer(stream_t* s, char
   return CD_FRAMESIZE_RAW;
 }
 
-static int seek(stream_t* s,off_t newpos) {
+static int seek(stream_t* s, uint64_t newpos) {
   cdda_priv* p = (cdda_priv*)s->priv;
   cd_track_t *cd_track;
   int sec;

Modified: trunk/stream/stream_cue.c
==============================================================================
--- trunk/stream/stream_cue.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_cue.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -480,7 +480,7 @@ static int cue_vcd_get_track_end (int tr
   return VCD_SECTOR_DATA * sector;
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos=newpos;
   cue_set_msf(s->pos/VCD_SECTOR_DATA);
   return 1;

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_dvd.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -416,7 +416,7 @@ static void dvd_close(dvd_priv_t *d)
 
 static int fill_buffer(stream_t *s, char *buf, int len)
 {
-  off_t pos;
+  uint64_t pos;
   if (len < 2048)
     return -1;
   pos = dvd_read_sector(s->priv, buf);
@@ -426,7 +426,7 @@ static int fill_buffer(stream_t *s, char
   return 2048; // full sector
 }
 
-static int seek(stream_t *s, off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos=newpos; // real seek
   dvd_seek(s->priv,s->pos/2048);
   return 1;
@@ -504,7 +504,7 @@ static int seek_to_chapter(stream_t *str
     dvd_priv_t *d = stream->priv;
     ptt_info_t ptt;
     pgc_t *pgc;
-    off_t pos;
+    uint64_t pos;
 
     if(!vts_file || !tt_srpt)
        return 0;
@@ -533,7 +533,7 @@ static int seek_to_chapter(stream_t *str
     d->packs_left     = -1;
     d->angle_seek     = 0;
 
-    pos = (off_t) d->cur_pack * 2048;
+    pos = d->cur_pack * 2048ull;
     mp_msg(MSGT_OPEN,MSGL_V,"\r\nSTREAM_DVD, seeked to chapter: %d, cell: %u, pos: %"PRIu64"\n",
         chapter, d->cur_pack, pos);
 
@@ -597,7 +597,7 @@ static int dvd_seek_to_time(stream_t *st
     unsigned int i, j, k, timeunit, ac_time, tmap_sector=0, cell_sector=0, vobu_sector=0;
     int t=0;
     double tm, duration;
-    off_t pos = -1;
+    uint64_t pos = -1;
     dvd_priv_t *d = stream->priv;
     vts_tmapt_t *vts_tmapt = vts_file->vts_tmapt;
 
@@ -624,7 +624,7 @@ static int dvd_seek_to_time(stream_t *st
       }
     }
 
-    pos = ((off_t)cell_sector)<<11;
+    pos = cell_sector * 2048ull;
     stream_seek(stream, pos);
     do {
       stream_skip(stream, 2048);
@@ -632,7 +632,7 @@ static int dvd_seek_to_time(stream_t *st
     } while(!t);
     tm = dvd_get_current_time(stream, -1);
 
-    pos = ((off_t)tmap_sector)<<11;
+    pos = tmap_sector * 2048ull;
     stream_seek(stream, pos);
     //now get current time in terms of the cell+cell time offset
     memset(&d->dsi_pack.dsi_gi.c_eltm, 0, sizeof(dvd_time_t));
@@ -641,7 +641,7 @@ static int dvd_seek_to_time(stream_t *st
           break;
         tm = dvd_get_current_time(stream, -1);
     };
-    tmap_sector = stream->pos >> 11;
+    tmap_sector = stream->pos / 2048;
 
     //search closest VOBU sector
     k=(vts_file->vts_vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4; //entries in the vobu admap
@@ -650,7 +650,7 @@ static int dvd_seek_to_time(stream_t *st
         break;
     }
     vobu_sector = vts_file->vts_vobu_admap->vobu_start_sectors[i-1];
-    pos = ((off_t)vobu_sector) << 11;
+    pos = vobu_sector * 2048ull;
     stream_seek(stream, pos);
 
     return 1;
@@ -1059,8 +1059,8 @@ static int open_s(stream_t *stream,int m
     stream->seek = seek;
     stream->control = control;
     stream->close = stream_dvd_close;
-    stream->start_pos = (off_t)d->cur_pack*2048;
-    stream->end_pos = (off_t)(d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048;
+    stream->start_pos = d->cur_pack*2048ull;
+    stream->end_pos = d->cur_pgc->cell_playback[d->last_cell-1].last_sector*2048ull;
     *file_format = DEMUXER_TYPE_MPEG_PS;
     mp_msg(MSGT_DVD,MSGL_V,"DVD start=%d end=%d  \n",d->cur_pack,d->cur_pgc->cell_playback[d->last_cell-1].last_sector);
     stream->priv = (void*)d;

Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_dvdnav.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -87,7 +87,7 @@ static const struct m_struct_st stream_o
   stream_opts_fields
 };
 
-static int seek(stream_t *s, off_t newpos);
+static int seek(stream_t *s, uint64_t newpos);
 static void show_audio_subs_languages(dvdnav_t *nav);
 
 static dvdnav_priv_t * new_dvdnav_stream(char * filename) {
@@ -276,7 +276,7 @@ static void update_title_len(stream_t *s
 
   status = dvdnav_get_position(priv->dvdnav, &pos, &len);
   if(status == DVDNAV_STATUS_OK && len) {
-    stream->end_pos = (off_t) len * 2048;
+    stream->end_pos = len * 2048ull;
     stream->seek = seek;
   } else {
     stream->seek = NULL;
@@ -285,7 +285,7 @@ static void update_title_len(stream_t *s
 }
 
 
-static int seek(stream_t *s, off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   uint32_t sector = 0;
   dvdnav_priv_t *priv = s->priv;
 

Modified: trunk/stream/stream_ffmpeg.c
==============================================================================
--- trunk/stream/stream_ffmpeg.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_ffmpeg.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -42,7 +42,7 @@ static int write_buffer(stream_t *s, cha
     return len;
 }
 
-static int seek(stream_t *s, off_t newpos)
+static int seek(stream_t *s, uint64_t newpos)
 {
     s->pos = newpos;
     if (avio_seek(s->priv, s->pos, SEEK_SET) < 0) {

Modified: trunk/stream/stream_file.c
==============================================================================
--- trunk/stream/stream_file.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_file.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -78,7 +78,7 @@ static int write_buffer(stream_t *s, cha
   return len;
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos = newpos;
   if(lseek(s->fd,s->pos,SEEK_SET)<0) {
     s->eof=1;
@@ -87,7 +87,7 @@ static int seek(stream_t *s,off_t newpos
   return 1;
 }
 
-static int seek_forward(stream_t *s,off_t newpos) {
+static int seek_forward(stream_t *s, uint64_t newpos) {
   if(newpos<s->pos){
     mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n");
     return 0;
@@ -143,7 +143,7 @@ fallback:
 static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
   int f;
   mode_t m = 0;
-  off_t len;
+  uint64_t len;
   unsigned char *filename;
   struct stream_priv_s* p = (struct stream_priv_s*)opts;
 

Modified: trunk/stream/stream_ftp.c
==============================================================================
--- trunk/stream/stream_ftp.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_ftp.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -284,7 +284,7 @@ static int FtpOpenPort(struct stream_pri
   return fd;
 }
 
-static int FtpOpenData(stream_t* s,off_t newpos) {
+static int FtpOpenData(stream_t* s, uint64_t newpos) {
   struct stream_priv_s* p = s->priv;
   int resp;
   char rsp_txt[256];
@@ -295,7 +295,7 @@ static int FtpOpenData(stream_t* s,off_t
   if(s->fd < 0) return 0;
 
   if(newpos > 0) {
-    snprintf(p->cmd_buf,CMD_BUFSIZE,"REST %"PRId64, (int64_t)newpos);
+    snprintf(p->cmd_buf,CMD_BUFSIZE,"REST %"PRIu64, newpos);
 
     resp = FtpSendCmd(p->cmd_buf,p,rsp_txt);
     if(resp != 3) {
@@ -332,7 +332,7 @@ static int fill_buffer(stream_t *s, char
   return (r <= 0) ? -1 : r;
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   struct stream_priv_s* p = s->priv;
   int resp;
   char rsp_txt[256];

Modified: trunk/stream/stream_live555.c
==============================================================================
--- trunk/stream/stream_live555.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_live555.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -29,7 +29,7 @@
 #include "libmpdemux/demuxer.h"
 #include "help_mp.h"
 
-static int _rtsp_streaming_seek(int fd, off_t pos, streaming_ctrl_t* streaming_ctrl) {
+static int _rtsp_streaming_seek(int fd, uint64_t pos, streaming_ctrl_t* streaming_ctrl) {
   return -1; // For now, we don't handle RTSP stream seeking
 }
 

Modified: trunk/stream/stream_nemesi.c
==============================================================================
--- trunk/stream/stream_nemesi.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_nemesi.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -39,7 +39,7 @@
 
 char *rtsp_destination = NULL;
 
-static int rtsp_streaming_seek(int fd, off_t pos,
+static int rtsp_streaming_seek(int fd, uint64_t pos,
                                streaming_ctrl_t* streaming_ctrl) {
     return -1;
 }

Modified: trunk/stream/stream_netstream.c
==============================================================================
--- trunk/stream/stream_netstream.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_netstream.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -188,8 +188,8 @@ static int fill_buffer(stream_t *s, char
 }
 
 
-static int seek(stream_t *s,off_t newpos) {
-  uint64_t pos = le2me_64((uint64_t)newpos);
+static int seek(stream_t *s, uint64_t newpos) {
+  uint64_t pos = le2me_64(newpos);
   mp_net_stream_packet_t* pack;
 
   pack = send_net_stream_cmd(s,NET_STREAM_SEEK,(char*)&pos,8);

Modified: trunk/stream/stream_smb.c
==============================================================================
--- trunk/stream/stream_smb.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_smb.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -86,7 +86,7 @@ static int control(stream_t *s, int cmd,
   return STREAM_UNSUPPORTED;
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos = newpos;
   if(smbc_lseek(s->fd,s->pos,SEEK_SET)<0) {
     s->eof=1;

Modified: trunk/stream/stream_vcd.c
==============================================================================
--- trunk/stream/stream_vcd.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_vcd.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -83,7 +83,7 @@ static int fill_buffer(stream_t *s, char
   return vcd_read(s->priv,buffer);
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos = newpos;
   vcd_set_msf(s->priv,s->pos/VCD_SECTOR_DATA);
   return 1;

Modified: trunk/stream/stream_vstream.c
==============================================================================
--- trunk/stream/stream_vstream.c	Sat Mar 16 10:20:51 2013	(r35974)
+++ trunk/stream/stream_vstream.c	Sat Mar 16 11:09:12 2013	(r35975)
@@ -90,7 +90,7 @@ static int fill_buffer(stream_t *s, char
   return len;
 }
 
-static int seek(stream_t *s,off_t newpos) {
+static int seek(stream_t *s, uint64_t newpos) {
   s->pos = newpos;
   return 1;
 }


More information about the MPlayer-cvslog mailing list