# HG changeset patch # User arpi # Date 1034779845 0 # Node ID 18f7389bc82260255503508cb2f34c8b1655991e # Parent ff5d9b3815b5205851d6faea2694bf6789af2974 ds_tell_block() diff -r ff5d9b3815b5 -r 18f7389bc822 libmpdemux/demuxer.h --- a/libmpdemux/demuxer.h Wed Oct 16 13:31:38 2002 +0000 +++ b/libmpdemux/demuxer.h Wed Oct 16 14:50:45 2002 +0000 @@ -71,8 +71,8 @@ int eof; // end of demuxed stream? (true if all buffer empty) off_t pos; // position in the input stream (file) off_t dpos; // position in the demuxed stream + off_t block_no; // number of <=block_size length blocks (for VBR mp3) int pack_no; // serial number of packet - int block_no; // number of <=block_size length blocks (for VBR mp3) int flags; // flags of current packet (keyframe etc) //--------------- int packs; // number of packets in buffer @@ -184,6 +184,10 @@ return (ds->pts_bytes-ds->buffer_size)+ds->buffer_pos; } +inline static off_t ds_tell_block(demux_stream_t *ds){ + return ds->block_no-(ds->buffer_size-ds->buffer_pos)/ds->block_size; +} + int demux_read_data(demux_stream_t *ds,unsigned char* mem,int len); int demux_read_data_pack(demux_stream_t *ds,unsigned char* mem,int len);