changeset 7748:18f7389bc822

ds_tell_block()
author arpi
date Wed, 16 Oct 2002 14:50:45 +0000
parents ff5d9b3815b5
children 48bf03297d48
files libmpdemux/demuxer.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);