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

Function hash_init

libavformat/hashenc.c:86–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85#if CONFIG_HASH_MUXER || CONFIG_MD5_MUXER
86static int hash_init(struct AVFormatContext *s)
87{
88 int res;
89 struct HashContext *c = s->priv_data;
90 c->per_stream = 0;
91 c->hashes = av_mallocz(sizeof(*c->hashes));
92 if (!c->hashes)
93 return AVERROR(ENOMEM);
94 res = av_hash_alloc(&c->hashes[0], c->hash_name);
95 if (res < 0)
96 return res;
97 av_hash_init(c->hashes[0]);
98 return 0;
99}
100#endif
101
102#if CONFIG_STREAMHASH_MUXER

Callers

nothing calls this directly

Calls 3

av_hash_allocFunction · 0.85
av_hash_initFunction · 0.85
av_malloczFunction · 0.50

Tested by

no test coverage detected