[FFmpeg-devel] [PATCH] vda: unlock the pixel buffer base address.

Clément Bœsch u at pkh.me
Tue Jun 23 09:21:08 CEST 2015


On Sat, Jun 20, 2015 at 01:19:29PM +0200, Sebastien Zwickert wrote:
> 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.
> 
> ---
>  ffmpeg_vda.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ffmpeg_vda.c b/ffmpeg_vda.c
> index d15648d..6fe4ed4 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;
>  

Applied, thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150623/eec86572/attachment.asc>


More information about the ffmpeg-devel mailing list