avconv_vdpau: use the hwcontext API to simplify code