I have set up a custom AVIOContext that takes a callback function and
writes out data to a buffer.
static int WritePacket(void *opaque, uint8_t *pBuffer, int pBufferSize) {
printf("Writen to file %i\n",pBufferSize);
return fwrite(pBuffer, pBufferSize, 1, FileOut);
}
int BUFFERSIZE= 32768;
AVIOContext *pAVIOContext= NULL;
unsigned char *pBufferCallBack= (unsigned char*)av_malloc(BUFFERSIZE *
sizeof(uint8_t));
pAVIOContext= avio_alloc_context(pBufferCallBack, BUFFERSIZE, 1, NULL,
NULL, WritePacket, NULL);
After avformat_write_header I would like to flush that to direct to the
buffer before I write any frames to the buffer. As of now it takes a 30
frames before that buffer flushes. I need access to the header before
frames are written. I tried avio_flush, but that didn't seem to do
anything.
Is there a way I can do this?
Thanks
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user