shithub: mcfs

ref: f6a0362e0845888acf03cac6a6fd8e98ffae42d2
dir: /aac.c/

View raw version
#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);
	for(i = 0; i < np; i++, p++){
		if(Bwrite(out, p->data, p->sz) != p->sz)
			goto err;
	}
	ctx->frid++;

	return 0;
err:
	werrstr("aacpacket: %r");
	return -1;
}