X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvaapi.c;h=15531e46bdc00d78fc055ad49a3e5105a2df3b90;hb=38c3ffbd55deb91622a58d8e20b15d263aadf131;hp=fcc6243899ac51271d07984e8179ed8c094947b4;hpb=bab8d73765238bfeea7a8dfd454f40ac213b3d22;p=ffmpeg diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c index fcc6243899a..15531e46bdc 100644 --- a/libavcodec/vaapi.c +++ b/libavcodec/vaapi.c @@ -4,20 +4,20 @@ * * Copyright (C) 2008-2009 Splitted-Desktop Systems * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -46,6 +46,9 @@ int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface) VABufferID va_buffers[3]; unsigned int n_va_buffers = 0; + if (!vactx->pic_param_buf_id) + return 0; + vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id); va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;