ref: ace30eb522ce18622b465e550c6926d895101cb0
dir: mcfs/aac.c
#include <u.h> #include <libc.h> #include <bio.h> #include "common.h" #include "packet.h" int aacpacket(Biobuf *out, Packetctx *ctx, Packet *p, int np, uvlong ts) { int i; USED(ts); if(ctx->codec.priv.sz > 0 && Bwrite(out, ctx->codec.priv.data, ctx->codec.priv.sz) != ctx->codec.priv.sz) goto err; for(i = 0; i < np; i++, p++){ if(Bwrite(out, p->data, p->sz) != p->sz) goto err; } return 0; err: werrstr("aacpacket: %r"); return -1; }