Make compatible with libav