Browse Source

lavd/xv: fix memory leak

Results of XvQueryAdaptors have to be freed with XvFreeAdaptorInfo.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
tags/n2.2-rc1
Lukasz Marek Stefano Sabatini 11 years ago
parent
commit
f04fe23a52
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavdevice/xv.c

+ 1
- 0
libavdevice/xv.c View File

@@ -97,6 +97,7 @@ static int xv_write_header(AVFormatContext *s)
if (XvQueryAdaptors(xv->display, DefaultRootWindow(xv->display), &num_adaptors, &ai) != Success)
return AVERROR_EXTERNAL;
xv->xv_port = ai[0].base_id;
XvFreeAdaptorInfo(ai);

if (encctx->pix_fmt != AV_PIX_FMT_YUV420P) {
av_log(s, AV_LOG_ERROR,


Loading…
Cancel
Save