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

Function av_asprintf

libavutil/avstring.c:115–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115char *av_asprintf(const char *fmt, ...)
116{
117 char *p = NULL;
118 va_list va;
119 int len;
120
121 va_start(va, fmt);
122 len = vsnprintf(NULL, 0, fmt, va);
123 va_end(va);
124 if (len < 0)
125 goto end;
126
127 p = av_malloc(len + 1);
128 if (!p)
129 goto end;
130
131 va_start(va, fmt);
132 len = vsnprintf(p, len + 1, fmt, va);
133 va_end(va);
134 if (len < 0)
135 av_freep(&p);
136
137end:
138 return p;
139}
140
141#define WHITESPACES " \n\t\r"
142

Callers 15

modplug_load_metadataFunction · 0.85
hls_startFunction · 0.85
append_single_fileFunction · 0.85
hls_write_packetFunction · 0.85
hls_write_trailerFunction · 0.85
hls_initFunction · 0.85
redirect_cache_setFunction · 0.85
get_cookiesFunction · 0.85
mpjpeg_read_packetFunction · 0.85
translate_ipfs_to_httpFunction · 0.85
write_packetFunction · 0.85

Calls 2

av_freepFunction · 0.85
av_mallocFunction · 0.70

Tested by 3

get_timeFunction · 0.68
draw_legendFunction · 0.68
sender_threadFunction · 0.68