diff options
author | Sebastien Zwickert <dilaroga@gmail.com> | 2015-06-20 13:19:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 04:43:40 +0200 |
commit | be6a569e3ab8e36a63136ce3fe854764efe99e2a (patch) | |
tree | 5838fed0ba5309aa7840619cecbac627042d2c5d | |
parent | e920af2cdf3fb4aca3d95954770a9fa085814975 (diff) | |
download | ffmpeg-be6a569e3ab8e36a63136ce3fe854764efe99e2a.tar.gz |
vda: unlock the pixel buffer base address.
The pixel buffer base address is never unlocked this causes
a bug with some pixel format types that are produced natively
by the hardware decoder: the first buffer was always used.
Unlock the pixel buffer base address fixes the issue.
(cherry picked from commit c06fdacc3dc706e70d953917fea845532d3703ca)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg_vda.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg_vda.c b/ffmpeg_vda.c index b9f0975f55..fded39e79b 100644 --- a/ffmpeg_vda.c +++ b/ffmpeg_vda.c @@ -77,6 +77,8 @@ static int vda_retrieve_data(AVCodecContext *s, AVFrame *frame) frame->width, frame->height); ret = av_frame_copy_props(vda->tmp_frame, frame); + CVPixelBufferUnlockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly); + if (ret < 0) return ret; |