On Tue, Jul 21, 2015 at 9:31 AM, Steve Lhomme <[email protected]> wrote: > On Tue, Jul 21, 2015 at 9:13 AM, Hendrik Leppkes <[email protected]> wrote: >> On Tue, Jul 21, 2015 at 8:43 AM, Steve Lhomme <[email protected]> wrote: >>> In case the VideoContext is used by different threads internally or >>> other threads externally >>> --- >>> libavcodec/d3d11va.h | 5 +++++ >>> libavcodec/dxva2.c | 15 +++++++++++++-- >>> libavcodec/version.h | 4 ++-- >>> 3 files changed, 20 insertions(+), 4 deletions(-) >>> >>> diff --git a/libavcodec/d3d11va.h b/libavcodec/d3d11va.h >>> index 2163b35..05d4fa6 100644 >>> --- a/libavcodec/d3d11va.h >>> +++ b/libavcodec/d3d11va.h >>> @@ -89,6 +89,11 @@ struct AVD3D11VAContext { >>> * Private to the Libav AVHWAccel implementation >>> */ >>> unsigned report_id; >>> + >>> + /** >>> + * Mutex to access video_context >>> + */ >>> + HANDLE context_mutex; >>> }; >>> >> >> Without an allocation function to alloc this struct and init the >> handle properly (since its init value is not 0, but >> INVALID_HANDLE_VALUE), this seems like it might very easily run into >> issues. > > In the case of VLC, the allocation function would be inconvenient as > we don't allocate all the pieces in the same place. Or do you mean a > function to provide all the elements at once ? In this case it would > be subject to ABI changes (just like to patch). >
I just find a value in a context which the user needs to init even if he doesn't use it very disturbing. - Hendrik _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
