On 2016-12-14 09:56:40 +0100, Anton Khirnov wrote:
> Certain hardware decoding APIs are not guaranteed to be thread-safe, so
> having the user access decoded hardware surfaces while the decoder is
> running in another thread can cause failures (this is mainly known to
> happen with DXVA2).
> 
> For such hwaccels, only allow the decoding thread to run while the user
> is inside a lavc decode call (avcodec_send_packet/receive_frame).
> ---
>  libavcodec/avcodec.h       |  5 +++++
>  libavcodec/hwaccel.h       | 24 +++++++++++++++++++++
>  libavcodec/pthread_frame.c | 52 
> ++++++++++++++++++++++++++++++++++++++++------
>  libavcodec/vaapi_h264.c    |  2 ++
>  libavcodec/vaapi_mpeg2.c   |  2 ++
>  libavcodec/vaapi_mpeg4.c   |  3 +++
>  libavcodec/vaapi_vc1.c     |  3 +++
>  libavcodec/vaapi_vp8.c     |  2 ++
>  libavcodec/vdpau_h264.c    |  2 ++
>  libavcodec/vdpau_hevc.c    |  2 ++
>  libavcodec/vdpau_mpeg12.c  |  3 +++
>  libavcodec/vdpau_mpeg4.c   |  2 ++
>  libavcodec/vdpau_vc1.c     |  3 +++
>  13 files changed, 99 insertions(+), 6 deletions(-)
>  create mode 100644 libavcodec/hwaccel.h

ok

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to