mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
ds_tell_block()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7749 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e73a9c9bf0
commit
6998d862e0
@ -71,8 +71,8 @@ typedef struct {
|
||||
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 @@ inline static int ds_tell_pts(demux_stream_t *ds){
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user