# HG changeset patch # User reimar # Date 1189858425 0 # Node ID 1639f54025406650b6f5506c05673a96702ab5f3 # Parent f877e1d2bb0fb2f26cc3cfad9ad285df2a9b622a get rid of pointless size parameter for tmf_load_chunk diff -r f877e1d2bb0f -r 1639f5402540 libmpdemux/demux_ty.c --- a/libmpdemux/demux_ty.c Sat Sep 15 11:56:24 2007 +0000 +++ b/libmpdemux/demux_ty.c Sat Sep 15 12:13:45 2007 +0000 @@ -187,7 +187,7 @@ // =========================================================================== static int tmf_load_chunk( demuxer_t *demux, TiVoInfo *tivo, - unsigned char *buff, int size, int readChunk ) + unsigned char *buff, int readChunk ) { off_t fileoffset; int count; @@ -201,7 +201,7 @@ mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" ); return 0; } - count = stream_read( demux->stream, buff, size ); + count = stream_read( demux->stream, buff, CHUNKSIZE ); demux->filepos = stream_tell( demux->stream ); mp_msg( MSGT_DEMUX, MSGL_DBG3, "tmf_load_chunk() count %x\n", @@ -391,7 +391,7 @@ mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Detected a tmf\n" ); tivo->tmf = 1; ty_tmf_filetoparts( demux, tivo ); - readSize = tmf_load_chunk( demux, tivo, chunk, CHUNKSIZE, 0 ); + readSize = tmf_load_chunk( demux, tivo, chunk, 0 ); } if ( readSize == CHUNKSIZE && AV_RB32(chunk) == TIVO_PES_FILEID ) @@ -420,7 +420,7 @@ { numberParts = tivo->tmf_totalparts; offset = numberParts * TIVO_PART_LENGTH; - readSize = tmf_load_chunk( demux, tivo, chunk, CHUNKSIZE, + readSize = tmf_load_chunk( demux, tivo, chunk, numberParts * ( TIVO_PART_LENGTH - CHUNKSIZE ) / CHUNKSIZE ); } @@ -484,8 +484,7 @@ } else { - readSize = tmf_load_chunk( demux, tivo, chunk, CHUNKSIZE, - tivo->whichChunk ); + readSize = tmf_load_chunk( demux, tivo, chunk, tivo->whichChunk ); if ( readSize != CHUNKSIZE ) return 0; tivo->whichChunk++; @@ -502,8 +501,7 @@ } else { - readSize = tmf_load_chunk( demux, tivo, chunk, CHUNKSIZE, - tivo->whichChunk ); + readSize = tmf_load_chunk( demux, tivo, chunk, tivo->whichChunk ); tivo->whichChunk++; }