1
0
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:
reimar 2005-09-17 18:05:55 +00:00
parent e41e46ea1f
commit 8771ad0741

View File

@ -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++] \