comparison libmpdemux/demuxer.c @ 26369:ad825aff822b

Remove unused function demux_read_data_pack According to VCS history this function has never been used since it was added in 2001...
author uau
date Fri, 11 Apr 2008 23:06:33 +0000
parents 65ad20416dd7
children 2dc23fc4724a
comparison
equal deleted inserted replaced
26368:92f1c7f009c4 26369:ad825aff822b
483 } 483 }
484 } 484 }
485 return bytes; 485 return bytes;
486 } 486 }
487 487
488 int demux_read_data_pack(demux_stream_t *ds,unsigned char* mem,int len){
489 int x;
490 int bytes=0;
491 while(len>0){
492 x=ds->buffer_size-ds->buffer_pos;
493 if(x==0){
494 if(!ds_fill_buffer(ds)) return bytes;
495 } else {
496 if(x>len) x=len;
497 if(mem) fast_memcpy(mem+bytes,&ds->buffer[ds->buffer_pos],x);
498 bytes+=x;len-=x;ds->buffer_pos+=x;
499 return bytes; // stop at end of package! (for correct timestamping)
500 }
501 }
502 return bytes;
503 }
504
505 /** 488 /**
506 * \brief read data until the given 3-byte pattern is encountered, up to maxlen 489 * \brief read data until the given 3-byte pattern is encountered, up to maxlen
507 * \param mem memory to read data into, may be NULL to discard data 490 * \param mem memory to read data into, may be NULL to discard data
508 * \param maxlen maximum number of bytes to read 491 * \param maxlen maximum number of bytes to read
509 * \param read number of bytes actually read 492 * \param read number of bytes actually read