idm: Fix bug in ID searching

* ID checking now checks if (id % step) == 0
* Extend possible ID range to allow UINT32_MAX (as long as base is non-zero)
This commit is contained in:
Eladash 2019-07-27 13:59:17 +03:00 committed by Ivan
parent 5c904bf3e2
commit 96527eee5b
4 changed files with 26 additions and 8 deletions

View file

@ -63,9 +63,9 @@ struct vdec_frame
struct vdec_context final
{
static constexpr u32 id_base = 0xf0000000;
static constexpr u32 id_step = 0x00000100;
static constexpr u32 id_count = 1024;
static const u32 id_base = 0xf0000000;
static const u32 id_step = 0x00000100;
static const u32 id_count = 1024;
AVCodec* codec{};
AVCodecContext* ctx{};