diff options
author | Sebastien Zwickert <dilaroga@gmail.com> | 2015-07-08 20:23:37 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-07-09 00:10:13 +0200 |
commit | 40af330adf7fde8073271cf2b41ff9adc4c2bba9 (patch) | |
tree | 7a6eb1ea5978557d164aafc94c45ae1f0102da6b | |
parent | 8fcd121b823caeadbe7597c9ae9229f6f164f949 (diff) | |
download | ffmpeg-40af330adf7fde8073271cf2b41ff9adc4c2bba9.tar.gz |
avconv: vda: Unlock the pixel buffer once it is accessed
Avoid possible issues with memmapped hardware buffers in
case VDA is not doing a conversion on behalf of the user
and make the code more proper as working example.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | avconv_vda.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/avconv_vda.c b/avconv_vda.c index 40f87c4f76..d86076e79e 100644 --- a/avconv_vda.c +++ b/avconv_vda.c @@ -76,6 +76,8 @@ static int vda_retrieve_data(AVCodecContext *s, AVFrame *frame) data, linesize, vda->tmp_frame->format, frame->width, frame->height); + CVPixelBufferUnlockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly); + ret = av_frame_copy_props(vda->tmp_frame, frame); if (ret < 0) return ret; |