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

Function av_opt_set_bin

libavutil/opt.c:895–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893}
894
895int av_opt_set_bin(void *obj, const char *name, const uint8_t *val, int len, int search_flags)
896{
897 uint8_t *ptr;
898 uint8_t **dst;
899 int *lendst;
900 int ret;
901
902 ret = opt_set_init(obj, name, search_flags, AV_OPT_TYPE_BINARY,
903 NULL, NULL, (void**)&dst);
904 if (ret < 0)
905 return ret;
906
907 ptr = len ? av_malloc(len) : NULL;
908 if (len && !ptr)
909 return AVERROR(ENOMEM);
910
911 lendst = (int *)(dst + 1);
912
913 av_free(*dst);
914 *dst = ptr;
915 *lendst = len;
916 if (len)
917 memcpy(ptr, val, len);
918
919 return 0;
920}
921
922int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_flags)
923{

Callers 5

rtmp_calc_swfhashFunction · 0.85
rtmp_http_send_cmdFunction · 0.85
rtmp_http_openFunction · 0.85
filter_opt_applyFunction · 0.85
init_filterFunction · 0.85

Calls 2

av_mallocFunction · 0.70
av_freeFunction · 0.70

Tested by

no test coverage detected