adapt to new libav API