lavc: add a variant of av_get_audio_frame_duration working with AVCodecParameters