FastLED 3.9.15
Loading...
Searching...
No Matches

◆ nsgif__app_ext_is_loop_count()

static bool fl::third_party::nsgif__app_ext_is_loop_count ( const fl::u8 * data,
fl::size len )
static

Check an app ext identifier and authentication code for loop count extension.

Parameters
[in]dataThe data to decode.
[in]lenByte length of data.
Returns
true if extension is a loop count extension.

Definition at line 816 of file gif.cpp.hpp.

819{
820 enum {
821 EXT_LOOP_COUNT_BLOCK_SIZE = 0x0b,
822 };
823
824 FL_ASSERT(len > 13, "Extension data too short");
825 (void)(len);
826
827 if (data[1] == EXT_LOOP_COUNT_BLOCK_SIZE) {
828 if (strncmp((const char *)data + 2, "NETSCAPE2.0", 11) == 0 ||
829 strncmp((const char *)data + 2, "ANIMEXTS1.0", 11) == 0) {
830 return true;
831 }
832 }
833
834 return false;
835}
#define FL_ASSERT(x, MSG)
Definition assert.h:6
int strncmp(const char *s1, const char *s2, size_t n) FL_NOEXCEPT

References FL_ASSERT, FL_NOEXCEPT, and fl::strncmp().

Referenced by nsgif__parse_extension_application().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: