Skip to content

Memory leak in QVideoEncoder #6

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
img_convert_ctx isn't freed on close()

ffmpeg::sws_getCachedContext() tries to use an already existing context but 
fails because initVars() sets img_convert_ctx to zero. So a new context is 
allocated on every new video.

Adding the following lines to QVideoEncoder::close() (before initVars) solves 
the problem:
// free the sws-context
sws_freeContext(img_convert_ctx);

Another solution would be of course to remove the corresponding line from 
initVars()

regards

Frederik Pasch

Original issue reported on code.google.com by [email protected] on 14 Feb 2011 at 2:36

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions