Commit f04fe23a authored by Lukasz Marek's avatar Lukasz Marek Committed by Stefano Sabatini

lavd/xv: fix memory leak

Results of XvQueryAdaptors have to be freed with XvFreeAdaptorInfo.
Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki@gmail.com>
parent 8cd3685a
...@@ -97,6 +97,7 @@ static int xv_write_header(AVFormatContext *s) ...@@ -97,6 +97,7 @@ static int xv_write_header(AVFormatContext *s)
if (XvQueryAdaptors(xv->display, DefaultRootWindow(xv->display), &num_adaptors, &ai) != Success) if (XvQueryAdaptors(xv->display, DefaultRootWindow(xv->display), &num_adaptors, &ai) != Success)
return AVERROR_EXTERNAL; return AVERROR_EXTERNAL;
xv->xv_port = ai[0].base_id; xv->xv_port = ai[0].base_id;
XvFreeAdaptorInfo(ai);
if (encctx->pix_fmt != AV_PIX_FMT_YUV420P) { if (encctx->pix_fmt != AV_PIX_FMT_YUV420P) {
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment