diff options
-rw-r--r-- | libmpdemux/demuxer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 498e1d5b59..b25aa15bef 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -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++] \ |