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

Function open_null_ctx

libavformat/segment.c:577–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577static int open_null_ctx(AVIOContext **ctx)
578{
579 int buf_size = 32768;
580 uint8_t *buf = av_malloc(buf_size);
581 if (!buf)
582 return AVERROR(ENOMEM);
583 *ctx = avio_alloc_context(buf, buf_size, 1, NULL, NULL, NULL, NULL);
584 if (!*ctx) {
585 av_free(buf);
586 return AVERROR(ENOMEM);
587 }
588 return 0;
589}
590
591static void close_null_ctxp(AVIOContext **pb)
592{

Callers 2

seg_initFunction · 0.85
seg_write_trailerFunction · 0.85

Calls 3

avio_alloc_contextFunction · 0.85
av_mallocFunction · 0.50
av_freeFunction · 0.50

Tested by

no test coverage detected