mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 19:52:14 +00:00
add a demux_peekc function that allows to just "have a look" at the next
byte of data from the demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16505 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e41e46ea1f
commit
8771ad0741
@ -257,6 +257,9 @@ inline static int ds_tell_pts(demux_stream_t *ds){
|
||||
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);
|
||||
|
||||
#define demux_peekc(ds) (\
|
||||
(likely(ds->buffer_pos<ds->buffer_size)) ? ds->buffer[ds->buffer_pos] \
|
||||
:((unlikely(!ds_fill_buffer(ds)))? (-1) : ds->buffer[ds->buffer_pos] ) )
|
||||
#if 1
|
||||
#define demux_getc(ds) (\
|
||||
(likely(ds->buffer_pos<ds->buffer_size)) ? ds->buffer[ds->buffer_pos++] \
|
||||
|
Loading…
Reference in New Issue
Block a user