[FFmpeg-trac] #3338(undetermined:new): Memory leak playing ogv videos
FFmpeg
trac at avcodec.org
Thu Jan 23 21:34:19 CET 2014
#3338: Memory leak playing ogv videos
-------------------------------------+-------------------------------------
Reporter: romain145 | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: leak | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by gjdfgh):
From the zip:
{{{
AVFrame *pFrame_YUV420P = avcodec_alloc_frame();
if(pFrame_YUV420P == NULL)
{
fprintf(stderr, "Could not allocate pFrame_YUV420P\n");
}
uint8_t *buffer_YUV420P = (uint8_t
*)av_malloc(avpicture_get_size(PIX_FMT_YUV420P,pCodecCtx->width,
pCodecCtx->height));
avpicture_fill((AVPicture *)pFrame_YUV420P,
buffer_YUV420P,PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
}}}
This is 100% broken. You can't use AVFrame this way. Besides, the decoder
allocates the frames for you.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3338#comment:3>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list