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

Function streamhash_init

libavformat/hashenc.c:103–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102#if CONFIG_STREAMHASH_MUXER
103static int streamhash_init(struct AVFormatContext *s)
104{
105 int res, i;
106 struct HashContext *c = s->priv_data;
107 c->per_stream = 1;
108 c->hashes = av_calloc(s->nb_streams, sizeof(*c->hashes));
109 if (!c->hashes)
110 return AVERROR(ENOMEM);
111 for (i = 0; i < s->nb_streams; i++) {
112 res = av_hash_alloc(&c->hashes[i], c->hash_name);
113 if (res < 0) {
114 return res;
115 }
116 av_hash_init(c->hashes[i]);
117 }
118 return 0;
119}
120#endif
121
122#if CONFIG_HASH_MUXER || CONFIG_MD5_MUXER || CONFIG_STREAMHASH_MUXER

Callers

nothing calls this directly

Calls 3

av_callocFunction · 0.85
av_hash_allocFunction · 0.85
av_hash_initFunction · 0.85

Tested by

no test coverage detected