Using the not so new init and uninit callbacks, avcodec can now take care of creating and destroying the VDPAU decoder instance.
The application is still responsible for creating the VDPAU device and allocating video surfaces - this is necessary to keep video surfaces on the GPU all the way to the output. But the application will no longer needs to care about any codec-specific aspects.
ce08328 vdpau: common support for managing the VdpDecoder in avcodec
libavcodec/vdpau.c | 64 +++++++++++++++++++++++++++++++++++++++++++
libavcodec/vdpau_internal.h | 32 ++++++++++++++++++++++
2 files changed, 96 insertions(+)