[Libav-user] Multiple avio_open_dyn_buf() / avio_close_dyn_buf() paired issue

Denis info at denisgottardello.it
Thu Sep 29 09:38:57 CEST 2011


In data mercoledì 28 settembre 2011 22:12:18, env01 ha scritto:
> I have not found the solution yet.
> 



I'm not sure that is the right way but I have found something.
After "avio_open_dyn_buf", I execute this:

typedef struct DynBuffer {
    int pos, size, allocated_size;
    uint8_t *buffer;
    int io_buffer_size;
    uint8_t io_buffer[1];
} DynBuffer;


DynBuffer *d= (DynBuffer*)pFormatCtx->pb->opaque;
QByteArray QBAByteIn((const char*)d->buffer, d->pos);
QFMPGFileOut.write(QBAByteIn);
d->pos= d->size= 0;



This does not works always. The file produced from a program that encodes some 
images in a file works only if you use the codecs CODEC_ID_THEORA and 
CODEC_ID_MPEG4 but not with the codecs CODEC_ID_VP8 and CODEC_ID_H264.



-- 
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation! 
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php


More information about the Libav-user mailing list