Commit 94dc3385 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avcodec/bytestream: Add unchecked bytestream2 peek functions

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent a902c249
......@@ -77,11 +77,15 @@ static av_always_inline type bytestream2_get_ ## name(GetByteContext *g) \
} \
return bytestream2_get_ ## name ## u(g); \
} \
static av_always_inline type bytestream2_peek_ ## name ## u(GetByteContext *g) \
{ \
return read(g->buffer); \
} \
static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g) \
{ \
if (g->buffer_end - g->buffer < bytes) \
return 0; \
return read(g->buffer); \
return bytestream2_peek_ ## name ## u(g); \
}
DEF(uint64_t, le64, 8, AV_RL64, AV_WL64)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment