[FFmpeg-trac] #521(undetermined:new): avio_open_dyn_buf()/avio_close_dyn_buf(), limit the memory usage

FFmpeg trac at avcodec.org
Thu Sep 29 23:12:02 CEST 2011


#521: avio_open_dyn_buf()/avio_close_dyn_buf(), limit the memory usage
--------------------------------------+----------------------------------
             Reporter:  mrdebug       |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  undetermined  |                  Version:  0.8.3
             Keywords:                |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 In my program the functions "avio_open_dyn_buf() / avio_close_dyn_buf()"
 work fine. On "avio_close_dyn_buf()" I can save the buffer in a file and
 the file can be played correctly.
 In order to limit the memory usage, I have inserted in my code this:

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

 that's executed many times before "avio_close_dyn_buf()" function.
 This works only with codecs CODEC_ID_THEORA and
 CODEC_ID_MPEG4 but not with codecs CODEC_ID_VP8 and CODEC_ID_H264.
 Is this a bug or is not possible to extract something from the buffer
 before "avio_close_dyn_buf()"?

 See the source code attached.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/521>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list