obsproject / obs-amd-encoder

AMD Advanced Media Framework Encoder Plugin for Open Broadcaster Studio
https://obsproject.com/forum/threads/amd-advanced-media-framework-encoder-plugin-for-obs-studio.52305/
GNU General Public License v2.0
454 stars 87 forks source link

API: Fix vector indexing #389

Closed jpark37 closed 4 years ago

jpark37 commented 4 years ago

Description

Functions were always looking at index 0. Bounds check was also not checking for values greater than size. We weren't seeing issues because these functions don't have active callers.

Fixes compiler warnings on Windows build.

Motivation and Context

Looking through compiler warnings, and noticed these functions weren't implemented correctly.

How Has This Been Tested?

No breakpoint inspection since these functions aren't called.

Windows 7 - Stop recording hangs with and without change. Windows 10 - Recording works with and without change.

Windows compiler warnings are gone.

Types of changes

Checklist:

Xaymar commented 4 years ago

Changes in api-base.* should have commits prefixed with API: not project:. Otherwise looks fine.