[FFmpeg-cvslog] vaapi_decode: Clear parameter buffers to fix picture reuse

Mark Thompson git at videolan.org
Fri Mar 24 14:05:09 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Oct 19 23:45:46 2016 +0100| [5e879b54a3a46817ea6c8a95a9aecab1176418b9] | committer: Mark Thompson

vaapi_decode: Clear parameter buffers to fix picture reuse

When decoding interlaced pictures, the structure is reused to render
to the same surface twice.  The parameter buffers were not being
cleared, which caused the i965 driver to error out.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e879b54a3a46817ea6c8a95a9aecab1176418b9
---

 libavcodec/vaapi_decode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index ab8445a..9e1087f 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -201,6 +201,7 @@ int ff_vaapi_decode_issue(AVCodecContext *avctx,
         AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS)
         ff_vaapi_decode_destroy_buffers(avctx, pic);
 
+    pic->nb_param_buffers = 0;
     pic->nb_slices        = 0;
     pic->slices_allocated = 0;
     av_freep(&pic->slice_buffers);



More information about the ffmpeg-cvslog mailing list