ref: c4409541f5a942d8200ed7e8ab58aaedc19932cf
parent: ace30eb522ce18622b465e550c6926d895101cb0
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue Dec 15 17:03:18 EST 2020
aacpacket: write codec private data once
--- a/aac.c
+++ b/aac.c
@@ -10,12 +10,16 @@
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;
+ if(ctx->codec.priv.sz > 0 && ctx->frid == 0){
+ if(Bwrite(out, ctx->codec.priv.data, ctx->codec.priv.sz) != ctx->codec.priv.sz)
+ goto err;
+ ctx->frid++;
+ }
for(i = 0; i < np; i++, p++){
if(Bwrite(out, p->data, p->sz) != p->sz)
goto err;
}
+ ctx->frid++;
return 0;
err: