MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_hex_to_data

Function ff_hex_to_data

libavformat/utils.c:479–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479int ff_hex_to_data(uint8_t *data, const char *p)
480{
481 int c, len, v;
482
483 len = 0;
484 v = 1;
485 for (;;) {
486 p += strspn(p, SPACE_CHARS);
487 if (*p == '\0')
488 break;
489 c = av_toupper((unsigned char) *p++);
490 if (c >= '0' && c <= '9')
491 c = c - '0';
492 else if (c >= 'A' && c <= 'F')
493 c = c - 'A' + 10;
494 else
495 break;
496 v = (v << 4) | c;
497 if (v & 0x100) {
498 if (data)
499 data[len] = v;
500 len++;
501 v = 1;
502 }
503 }
504 return len;
505}
506
507void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
508 void *context)

Callers 5

get_key_from_kidFunction · 0.85
parse_fmtp_configFunction · 0.85
parse_fmtp_configFunction · 0.85
parse_playlistFunction · 0.85
concat_parse_scriptFunction · 0.85

Calls 1

av_toupperFunction · 0.85

Tested by

no test coverage detected